Exemplo n.º 1
0
 public Category Update(Category CategoryUpdate)
 {
     context.Attach(CategoryUpdate).State = EntityState.Modified;
     context.Entry(CategoryUpdate).Reference(c => c.ParentCategory).IsModified = true;
     context.SaveChanges();
     return(CategoryUpdate);
 }
Exemplo n.º 2
0
 public Invoice Update(Invoice InvoiceUpdate)
 {
     context.Attach(InvoiceUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(context.Invoices.Find(FindInvoiceWithID(InvoiceUpdate.ID)));
 }
Exemplo n.º 3
0
 public Supplier Update(Supplier SupplierUpdate)
 {
     context.Attach(SupplierUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(context.Suppliers.Find(FindSupplierWithID(SupplierUpdate.ID)));
 }
Exemplo n.º 4
0
 public Order66 Update(Order66 Order66Update)
 {
     context.Attach(Order66Update).State = EntityState.Modified;
     context.SaveChanges();
     return(context.Orders.Find(FindOrder66WithID(Order66Update.ID)));
 }
Exemplo n.º 5
0
 public Product Update(Product ProductUpdate)
 {
     context.Attach(ProductUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(ProductUpdate);
 }
Exemplo n.º 6
0
 public User Update(User UserUpdate)
 {
     context.Attach(UserUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(context.Users.Find(FindUserWithID(UserUpdate.ID)));
 }
Exemplo n.º 7
0
 public Address Update(Address AddressUpdate)
 {
     context.Attach(AddressUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(context.Addresses.Find(FindAddressWithID(AddressUpdate.ID)));
 }
Exemplo n.º 8
0
 public ProductImage Update(ProductImage ProductImageUpdate)
 {
     context.Attach(ProductImageUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(context.ProductImages.Find(FindProductImageWithID(ProductImageUpdate.ID)));
 }
Exemplo n.º 9
0
 public Shipment Update(Shipment ShipmentUpdate)
 {
     context.Attach(ShipmentUpdate).State = EntityState.Modified;
     context.SaveChanges();
     return(context.Shipments.Find(FindShipmentWithID(ShipmentUpdate.ID)));
 }