public async Task <Comment> AddRouteCommentAsync(AddRouteCommentModel model) { var comment = model.Adapt <Comment>(); context.Comments.Add(comment); await context.SaveChangesAsync(); return(comment); }
public async Task <ActionResult> Add(AddRouteCommentModel model) { var comment = await commentService.AddRouteCommentAsync(model); return(Ok(comment)); }