Пример #1
0
        public async Task <GetBatchCountResponse> Handle(GetBatchCountRequest request, CancellationToken cancellationToken)
        {
            var errorMessage = string.Empty;
            int response     = 0;

            try
            {
                response = await _infoServiceWrapper.GetBatchCount(request.AccountId, request.BatchNumber);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new GetBatchCountResponse
            {
                IsServiceCallSuccess = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                GetBatchCountResult = response
            }));
        }