Exemple #1
0
        public DynamicEntitySampleDbContext CreateDbContext(string[] args)
        {
            DynamicEntitySampleEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new DynamicEntitySampleDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     DynamicEntitySampleEfCoreEntityExtensionMappings.Configure();
 }