public async Task <IActionResult> GetAllComment() { var query = new GetAllCommentQuery(); var result = await _mediator.Send(query); return(result == null?Error(new { info = "خطایی رخ داده است" }) : Success(result)); }
public async Task <IEnumerable <Comment> > Handle(GetAllCommentQuery request, CancellationToken cancellationToken) { string functionName = "GetAllComment:Get:"; Log.ForContext("Message", functionName) .ForContext("Error", "").Information(functionName); return(await _read.GetAllComment()); }