Пример #1
0
        public UnitOfWork(string connectionString)
        {
            var optionsBuilder = new DbContextOptionsBuilder <DeliveryDataBaseContext>();
            var options        = optionsBuilder.UseSqlServer(connectionString).Options;

            context = new DeliveryDataBaseContext(options);
        }
Пример #2
0
 public ProductsRepository(DeliveryDataBaseContext context)
 {
     _db = context;
 }
Пример #3
0
 public CustomersRepository(DeliveryDataBaseContext context)
 {
     _db = context;
 }