-
Notifications
You must be signed in to change notification settings - Fork 3
MigrationsExtensionsDbContextDesignTimeFactory Class
Dennis C. Mitchell edited this page Mar 28, 2019
·
6 revisions
This class is a generic implementation of Microsoft.EntityFrameworkCore.Design.IDesignTimeDbContextFactory. The class makes it easier to use Entity Framework Migrations with DbContext classes that have only a single constructor taking DbContextOptions as a parameter.
Special Note: The class targets SQL Server only, and it requires the following NuGet package: EDennis.MigrationsExtensions
- Create a subclass of MigrationsExtensionsDbContextDesignTimeFactory, where the type parameter is the name of your DbContext class.
- Create a ConnectionStrings object in appsettings.Development.json and add a property whose key is the name of your DbContext class and whose value is the connection string.
public class AgencyInvestigatorCheckContextDesignTimeFactory :
MigrationsExtensionsDbContextDesignTimeFactory<AgencyInvestigatorCheckContext> { }Development Support
- Temporal Entities
- Base Repository Classes
- Base API Controller Classes
- ApiClient and SecureApiClient
- Security Utilities
- IServiceCollection Extension Methods
- HttpClient Extension Methods
- ScopeProperties
- MigrationsExtensionsDbContextDesignTimeFactory
Testing Support
- API Launcher
- Testing Strategy and Infrastructure
- Xunit Support Classes
- Testing Security Utilities
Related Projects