// GET: Borrowers/Details/5 public async Task <ActionResult> Details(int id) { Borrower borrower = await _borrowerRepository.GetByIdAsync(id); if (borrower == null) { return(HttpNotFound()); } return(View(borrower)); }
// GET: api/Borrowers/5 /// <summary> /// Pobranie informacji wypożyczającego o podanym ID /// </summary> public async Task <IHttpActionResult> GetBorrower(int id) { Borrower borrower = await _borrowerRepository.GetByIdAsync(id); if (borrower == null) { return(NotFound()); } return(Ok(_mapper.Map <BorrowerOutputModel>(borrower))); }