public JsonResult Delete(int id) { Borrower book = borrowerRepository.GetByID(id); borrowerRepository.Delete(book); if (borrowerRepository.Commit()) { return(Json(new { Resule = "Ok", Message = "Borrower deleted" })); } return(Json(new { Resule = "Error", Message = "Borrower cant be deleted" })); }
public void Delete(Guid id) { _borrowerRepository.Delete(id); }