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)); }
public IHttpActionResult Get() { return(Ok(topicLogic.GetAll())); }