Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple IDesignTimeDbContextFactory example
public class FooDbContextFactory : IDesignTimeDbContextFactory<FooDbContext>
public FooDbContext CreateDbContext(string[] args)
var optionsBuilder = new DbContextOptionsBuilder<FooDbContext>();
return new FooDbContext(optionsBuilder.Options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.