public async Task <PostReply> CreatePostReply(PostReplyDTO postReplyModel) { var postReply = this._mapper.Map <PostReply>(postReplyModel); var result = await this._context.AddAsync(postReply); await this._context.SaveChangesAsync(); return(result.Entity); }
public IActionResult CreatePostReply(PostReplyDTO model) { var result = this._postReplyService.CreatePostReply(model); if (result == null) { return(BadRequest("Something went wrong :(")); } else { return(Ok("The forum theme was created!")); } }