Пример #1
0
        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" }));
        }
Пример #2
0
 public void Delete(Guid id)
 {
     _borrowerRepository.Delete(id);
 }