Inheritance: BaseObject
コード例 #1
0
 public PostContent Add(PostContent postContent)
 {
     try
     {
         return PostContentMapper.ToDto(_postContentRepository.Add(PostContentMapper.ToEntity(postContent)));
     }
     catch (Exception ex)
     {
         throw new BlogException(ex.Message, ex.InnerException);
     }
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public PostContent Add(PostContent postImage)
 {
     return _postContentsLogic.Add(postImage);
 }
コード例 #4
0
 public PostContent Add(PostContent postContent, string authenticationToken)
 {
     throw new System.NotImplementedException();
 }