public IActionResult GetById(int id) { var library = _libraryRepository.FindByID(id); if (library == null) { return(Ok("Library doesn't exist!")); } return(Ok(library)); }
public IActionResult GetById(long idLibrary) { var item = libraryRepository.FindByID(idLibrary); if (item == null) { return(NotFound("Library with id : " + item.libraryid + " is not present. Enter valid library id.")); } return(Ok(item)); }