Exemple #1
0
 public UnitOfWork(IConversionContext context, IUserContext userContext)
 {
     _context     = (ConversionsContext)context;
     _userContext = (UserContext)userContext;
     Converts     = new ConvertRepository(_context);
     Users        = new UserRepository(_userContext);
 }
Exemple #2
0
        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();
            }
        }
Exemple #3
0
        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;
 }
Exemple #7
0
 public ConversionDal(ConversionsContext db)
 {
     _db = db;
 }
 public IdentityProviderDal(ConversionsContext db)
 {
     _db = db;
 }