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

            GoblinDbContextFactoryHelper.Build(null, optionsBuilder);

            return(new GoblinDbContext(optionsBuilder.Options));
        }
コード例 #2
0
        public static IServiceCollection AddGoblinDbContext(this IServiceCollection services)
        {
            GoblinDbContextFactoryHelper.Build(services, null);

            return(services);
        }