Ejemplo n.º 1
0
        public async Task <GetCoreDetailsByOtherBarcodeResponse> Handle(GetCoreDetailsByOtherBarcodeRequest request, CancellationToken cancellationToken)
        {
            var        errorMessage = string.Empty;
            CoreDetail response     = null;

            try
            {
                response = await _infoServiceWrapper.GetCoreDetailsByOtherBarcode(request.AccountId, request.CardNumber);
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }
            return(await Task.FromResult(new GetCoreDetailsByOtherBarcodeResponse
            {
                IsServiceCallSuccess = string.IsNullOrEmpty(errorMessage) ? true : false,
                ErrorMessage = errorMessage,
                CoreDetail = response
            }));
        }