public ActionResult DeleteConfirmed(int deleteID) { Pet deletingPet = _dataBase.Pets.FirstOrDefault(pets => pets.PetId == deleteID); _dataBase.Remove(deletingPet); _dataBase.SaveChanges(); return(View("ConfirmedAboutDeletion")); }
public ActionResult DeleteConfirmed(int deleteID) { Customer deletingCustomer = _dataBase.Customers.FirstOrDefault(customers => customers.CustomerId == deleteID); _dataBase.Remove(deletingCustomer); _dataBase.SaveChanges(); return(View("ConfirmedAboutDeletion")); }