public IActionResult Post([FromBody] OwnCommentModel model) { var owncomment = ModelFactory.Map(model); DataService.AddOwnComment(owncomment); return(Ok(ModelFactory.Map(owncomment, Url))); }
public IActionResult Put(int id, [FromBody] OwnCommentModel model) { var own = ModelFactory.Map(model); own.CommentId = id; if (!DataService.UpdateOwnComment(own)) { return(NotFound()); } return(Ok()); }