//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()}"); }
public static void RegisterSharedServices(this IAppStarter starter, IServiceCollection services) { services.AddScoped <ReferenceService>(); services.AddSingleton <UnitOfWorkFactory>(); }