示例#1
0
        public GoblinDbContext CreateDbContext(string[] args)
        {
            var optionsBuilder = new DbContextOptionsBuilder <GoblinDbContext>();

            GoblinDbContextFactoryHelper.Build(null, optionsBuilder);

            return(new GoblinDbContext(optionsBuilder.Options));
        }
        public static IServiceCollection AddGoblinDbContext(this IServiceCollection services)
        {
            GoblinDbContextFactoryHelper.Build(services, null);

            return(services);
        }