Example #1
0
        public async Task <IActionResult> Get()
        {
            try
            {
                var objs = (await objRep.Get());
                if (objs.ResultObject == null)
                {
                    return(NotFound());
                }

                return(Ok(objs));
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }
Example #2
0
 public Personnel Get(int id)
 {
     return(_dataRepository.Get(id));
 }
 public IEnumerable <Personnel_API> Get()
 {
     return(_repo.Get().Select(e => e.ToAPI()));;
 }