Esempio n. 1
0
        public ActionResult Get()
        {
            IEnumerable <TopicEntity> topics;

            try
            {
                topics = topicLogic.GetAll();
            }
            catch (ArgumentException ex)
            {
                return(BadRequest(ex.Message));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
            var topicsOut = mapper.Map <IEnumerable <TopicEntity>, IEnumerable <TopicModelOut> >(topics);

            return(this.Ok(topicsOut));
        }
Esempio n. 2
0
 public IHttpActionResult Get()
 {
     return(Ok(topicLogic.GetAll()));
 }