using Elsa.Persistence.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Design; namespace Sample14 { public class ElsaContextFactory : IDesignTimeDbContextFactory { public ElsaContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); optionsBuilder.UseSqlite( @"Data Source=c:\data\elsa.entity-framework-core.db;Cache=Shared", x => x.MigrationsAssembly(typeof(Program).Assembly.FullName)); return new ElsaContext(optionsBuilder.Options); } } }