public PostContent Add(PostContent postContent) { try { return PostContentMapper.ToDto(_postContentRepository.Add(PostContentMapper.ToEntity(postContent))); } catch (Exception ex) { throw new BlogException(ex.Message, ex.InnerException); } }
public IHttpActionResult Post([FromBody]PostContent postContent) { try { var result = _postContentsSvc.Add(postContent); return Ok(result); } catch (Exception ex) { _errorSignaler.SignalFromCurrentContext(ex); var errorResult = new PostContent().GenerateError<PostContent>((int)Constants.Error.InternalError, "Server technical error"); return Ok(errorResult); } }
public PostContent Add(PostContent postImage) { return _postContentsLogic.Add(postImage); }
public PostContent Add(PostContent postContent, string authenticationToken) { throw new System.NotImplementedException(); }