Example #1
0
        public TodoAppDbContext CreateDbContext(string[] args)
        {
            TodoAppEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <TodoAppDbContext>()
                          .UseSqlServer(configuration.GetConnectionString("Default"));

            return(new TodoAppDbContext(builder.Options));
        }
Example #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     TodoAppEfCoreEntityExtensionMappings.Configure();
 }