Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tonysneed
Created October 1, 2017 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonysneed/d81bc10eb49a9c8dd05267900b1e6463 to your computer and use it in GitHub Desktop.
Save tonysneed/d81bc10eb49a9c8dd05267900b1e6463 to your computer and use it in GitHub Desktop.
public class NorthwindSlimContextFactory : IDesignTimeDbContextFactory<NorthwindSlimContext>
{
public NorthwindSlimContext CreateDbContext(string[] args)
{
var optionsBuilder = new DbContextOptionsBuilder<NorthwindSlimContext>();
optionsBuilder.UseSqlite("Data Source=northwindslim.db");
return new NorthwindSlimContext(optionsBuilder.Options);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment