public Product DeleteProduct(int id) { Product toBeDeleted = context.Find <Product>(id); if (toBeDeleted != null) { context.Remove(toBeDeleted); context.SaveChanges(); } return(toBeDeleted); }
public Order Delete(int id) { Order toBeDeleted = context.Find <Order>(id); if (toBeDeleted != null) { context.Remove(toBeDeleted); context.SaveChanges(); } return(toBeDeleted); }