public async Task <IActionResult> DeleteVendor(int id) { var vendor = await _repo.GetVendor(id); _repo.Delete(vendor); if (await _repo.SaveAll()) { return(NoContent()); } throw new Exception($"Deleting Vendor {id} failed on delete!"); }
public async Task <IActionResult> DeleteUser(int id) { var user = await _repo.GetUser(id); _repo.Delete(user); if (await _repo.SaveAll()) { return(NoContent()); } throw new Exception($"Deleting user {id} failed on save!"); }