Esempio n. 1
0
        public IHttpActionResult Get()
        {
            IEnumerable <Parent> parents;

            try
            {
                parents = db.Get();
            }
            catch (NullReferenceException e)
            {
                logger.Error(e.Message);
                return(NotFound());
            }
            logger.Info("Requesting parents");
            return(Ok(parents));
        }
 public IHttpActionResult GetAllParents()
 {
     return(Ok(parentsService.Get()));
 }