Esempio n. 1
0
        public void CreateAInvalidOrderPlataformTest()
        {
            Order order = new Order();
            order.Plataform = "PC";

            Validator.Validate(order);
        }
Esempio n. 2
0
 public Order Update(Order order)
 {
     DbEntityEntry entry = context.Entry(order);
     entry.State = EntityState.Modified;
     context.SaveChanges();
     return order;
 }
Esempio n. 3
0
        public void CreateAInvalidOrderNameTest()
        {
            Order order = new Order();

            Validator.Validate(order);
        }
Esempio n. 4
0
 public Order Save(Order order)
 {
     var newOrder = context.Orders.Add(order);
     context.SaveChanges();
     return newOrder;
 }