public Books GetById(int id) { if (id <= 0) { throw new ArgumentException("ID requires to be greater than 0."); } return(repos.GetById(id)); }
public ActionResult <Organization> GetOrganization(int id) { try { _log4net.Info("Http get request initiated with " + id); var organization = _repository.GetById(id); if (organization == null) { _log4net.Info("Organization with that Requested Id not Found"); return(NotFound()); } _log4net.Info("Found Matching Organization"); return(organization); } catch (Exception e) { _log4net.Error("No content Obtained " + e.Message); return(NotFound()); } }
public Users GetById(int id) { return(repos.GetById(id)); }
public Movie GetMovie(Guid id) { return(_repo.GetById(id)); }
public async Task <ActionResult <TEntity> > GetById(int id) => await _repo.GetById(id);
public Location GetLocation(Guid id) { return(_repo.GetById(id)); }