public async Task <ActionResult> AddCommentary(ReportInteractionHistoryCommentaryInsertDto commentary)
        {
            InteractionHistoryCommentary newCommentary = new InteractionHistoryCommentary()
            {
                UserId = commentary.UserId,
                InteractionHistoryId        = commentary.ReportInteractionHistoryId,
                InteractionHistoryCommentId = commentary.ReportInteractionHistoryCommentaryId,
                Commentary   = commentary.Commentary,
                CreationDate = DateTime.Now
            };

            await _commentaryService.Add(newCommentary);

            var created = await _commentaryService.GetById(newCommentary.Id);

            return(CustomResponse(created));

            // return CreatedAtAction(nameof(GetCommentaryById), new {Id = newCommentary.Id, Version = "1.0"}, created);
        }
Beispiel #2
0
 public async Task Remove(InteractionHistoryCommentary commentary)
 {
     await _repository.Remove(commentary);
 }
Beispiel #3
0
 public async Task Add(InteractionHistoryCommentary commentary)
 {
     await _repository.Add(commentary);
 }