Ejemplo n.º 1
0
 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());
            }
        }
Ejemplo n.º 3
0
 public Users GetById(int id)
 {
     return(repos.GetById(id));
 }
Ejemplo n.º 4
0
 public Movie GetMovie(Guid id)
 {
     return(_repo.GetById(id));
 }
Ejemplo n.º 5
0
 public async Task <ActionResult <TEntity> > GetById(int id) => await _repo.GetById(id);
Ejemplo n.º 6
0
 public Location GetLocation(Guid id)
 {
     return(_repo.GetById(id));
 }