public IActionResult GetById(int id) { var patron = _patronRepository.FindByID(id); if (patron == null) { return(Ok("Patron doesn't exist!")); } return(Ok(patron)); }
public IActionResult GetById(long idPatron) { var item = patronRepository.FindByID(idPatron); if (item == null) { return(NotFound("Patron with id : " + idPatron + " is not present. Enter valid patron id.")); } return(Ok(item)); }