示例#1
0
        public async Task <IActionResult> GetAllComment()
        {
            var query  = new GetAllCommentQuery();
            var result = await _mediator.Send(query);

            return(result == null?Error(new { info = "خطایی رخ داده است" }) : Success(result));
        }
示例#2
0
        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());
        }