public async Task <BaseResponseViewModel> AddCommentAsync(int questionId, string comment) { var questionComment = new QuestionComment(); questionComment.Comment = comment; questionComment.QuestionId = questionId; questionComment.CreatedAt = DateTime.Now; questionComment.UpdatedAt = DateTime.Now; questionComment.Author = this.currentUser; await this.questionCommentRepository.AddAsync(questionComment); await this.uow.SaveChangesAsync(); var response = new BaseResponseViewModel(); response.Id = questionComment.Id; return(response); }
public async Task <BaseResponseViewModel> AddCommentAsync(int answerId, string comment) { var answerComment = new AnswerComment(); answerComment.Comment = comment; answerComment.AnswerId = answerId; answerComment.CreatedAt = DateTime.Now; answerComment.UpdatedAt = DateTime.Now; answerComment.Author = this.currentUser; await this.answerCommentRepository.AddAsync(answerComment); await this.uow.SaveChangesAsync(); var response = new BaseResponseViewModel() { Id = answerComment.Id }; return(response); }
public EmployeeResponse() { Messages = new BaseResponseViewModel(); Result = new EmployeeResponseDTO(); }
public EmployeesResponse() { Messages = new BaseResponseViewModel(); Result = new List <EmployeeResponseDTO>(); }