public UnitOfWork(IConversionContext context, IUserContext userContext) { _context = (ConversionsContext)context; _userContext = (UserContext)userContext; Converts = new ConvertRepository(_context); Users = new UserRepository(_userContext); }
public static void Main(string[] args) { var logger = NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger(); try { logger.Debug("Run DB migrations"); using (var context = new ConversionsContext()) { context.Database.Migrate(); } logger.Debug("Initialize server"); GetWebHostBuilder(args).Build().Run(); } catch (Exception e) { logger.Error(e, "Stopped program because of exception"); throw; } finally { NLog.LogManager.Shutdown(); } }
public static void Main(string[] args) { using (var context = new ConversionsContext()) { context.Database.Migrate(); } CreateWebHostBuilder(args).Build().Run(); }
public ConvertRepository(ConversionsContext context) : base(context) { }
public UnitTypeDal(ConversionsContext db) { _db = db; }
public ConverterListDal(ConversionsContext db) { _db = db; }
public ConversionDal(ConversionsContext db) { _db = db; }
public IdentityProviderDal(ConversionsContext db) { _db = db; }