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

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <SampleDbContext>()
                          .UseSqlite(configuration.GetConnectionString("Default"));

            return(new SampleDbContext(builder.Options));
        }
Exemple #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     SampleEfCoreEntityExtensionMappings.Configure();
 }