public async Task <RequestCommentsModel> Post([FromBody] CreateRequestCommentsModel requestModel) { var item = await _service.Create(requestModel); var model = _mapper.Map <RequestCommentsModel>(item); return(model); }
public async Task <RequestComment> Create(CreateRequestCommentsModel model) { var requestComment = new RequestComment { Comment = model.Comment.Trim(), ServiceProviderID = model.ServiceProviderID, RequestID = model.RequestID }; _uow.Add(requestComment); await _uow.CommitAsync(); return(requestComment); }