示例#1
0
        //public Db()
        //{

        //}

        public Db(DbContextOptions<Db> options, IAppStarter appStarter, ILoggerFactory loggerFactory) : base(options)
        {
            _appStarter = appStarter;
            _logger = loggerFactory.CreateLogger<Db>();
            //_logger.LogDebug($"New database context created {GetHashCode()}");
        }
示例#2
0
 public static void RegisterSharedServices(this IAppStarter starter, IServiceCollection services)
 {
     services.AddScoped <ReferenceService>();
     services.AddSingleton <UnitOfWorkFactory>();
 }