elsa-core/src/persistence/Elsa.Persistence.EntityFrameworkCore
Sipke Schoorstra 8092d166a5
Add native .NET code support + activity input/output (#216)
* Add code activity

* Refactor Workflow State to use Variables

* Update InstantEvent and SetVariable

* Update samples

* Add activity input/output
2019-12-23 21:43:11 +01:00
..
CustomSchema Fix broken date/time/nodatime serialization (#214) 2019-12-21 10:05:10 +01:00
DbContexts Add native .NET code support + activity input/output (#216) 2019-12-23 21:43:11 +01:00
Entities Feature/persist on every activity (#215) 2019-12-21 12:34:27 +01:00
Extensions Fix broken date/time/nodatime serialization (#214) 2019-12-21 10:05:10 +01:00
Mapping Remove LastResult, refactor activity output 2019-11-24 15:25:16 +01:00
Migrations Add native .NET code support + activity input/output (#216) 2019-12-23 21:43:11 +01:00
Services Merge branch 'develop' into feature/elsa-2.0 2019-12-17 21:50:53 +01:00
Elsa.Persistence.EntityFrameworkCore.csproj Feature - Customize Elsa.Persistence.EntityFrameworkCore Migrations and Schema (#204) 2019-12-17 21:38:58 +01:00
EntityFrameworkCoreElsaBuilder.cs Workflow Registry refresh upon workflow definition updates (#101) 2019-10-23 21:23:25 +02:00
icon.png Add icons to packages 2019-11-22 17:34:55 +01:00
README.md Feature: Persistence Provider -> Added PostgreSql support to Elsa.Persistence.EntityFrameworkCore via Npgsql (#201) 2019-11-28 11:35:30 +01:00

Generating migrations

We should generate migration sets per provider as described here: https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/providers?tabs=dotnet-core-cli

Example commands:

dotnet ef migrations add InitialCreate --context SqliteContext --output-dir Migrations/Sqlite
dotnet ef migrations add InitialCreate --context SqlServerContext --output-dir Migrations/SqlServer
dotnet ef migrations add InitialCreate --context PostgreSqlContext --output-dir Migrations/PostgreSql

Creating and updating the Sqlite database

First, set the appropriate connection string. To create the database, run the migrations.

Example command:

SET EF_CONNECTIONSTRING="Data Source=c:\data\elsa.db;Cache=Shared"
dotnet ef database update --context SqliteContext

SET EF_CONNECTIONSTRING="Server=localhost;Database=Elsa;User=sa;Password=Secret_password123!;"
dotnet ef database update --context SqlServerContext

SET EF_CONNECTIONSTRING="Server=localhost;Database=Elsa;Port=5432;User Id=postgres;Password=Secret_password123!"
dotnet ef database update --context PostgreSqlContext