Пример #1
0
        public void DatabaseExists()
        {
            var context = new AwesomeStoreContext();
            var order   = context.Orders.First();

            Assert.IsNotNull(order);
        }
Пример #2
0
        public void AddLineToOrder()
        {
            var context  = new AwesomeStoreContext();
            var customer = context.Customers.FirstOrDefault();
            var order    = new Order(customer);
            var line     = order.AddLine(10, 1);

            context.Orders.Add(order);
            context.OrderLines.Add(line);
            context.SaveChanges();
        }
Пример #3
0
 public UnitOfWork(AwesomeStoreContext context)
 {
     _context = context;
 }
Пример #4
0
 public CreateOrderCommandRepository(AwesomeStoreContext context)
 {
     _context = context;
 }