Ejemplo n.º 1
0
        public async ValueTask <Dto.Res.Biz.WriteLog> ExecuteAsync(Dto.Req.Biz.List.WriteLog request, CancellationToken cancellationToken = default)
        {
            var output = new Dto.Res.Biz.WriteLog(false);

            try
            {
                var list = request.List.Select(message => _mapper.Map <WriteLogEvent>(message)).ToList();
                await _biz.WriteLogsAsync(list);
            }
            catch (Exception ex)
            {
                _logger.LogError("WriteLogsReqHdlr Execute:  " + ex.Message + " - " + ex.StackTrace);
            }

            return(output);
        }