public async Task <ResponseModel <Payment> > GetPayments() { var response = new ResponseModel <Payment>() { ResponseData = new List <Payment>(), Errors = new List <string>() }; sessionId = GetSessionId(); if (String.IsNullOrEmpty(sessionId) || String.IsNullOrWhiteSpace(sessionId)) { response.ResponseCode = ReturnCodesConstant.R08; response.ResponseMessage = ReturnCodesConstant.R08Message; response.Errors.Add("No CartId provided."); return(response); } ; var dbResponse = await _dbRepo.GetPayments(sessionId); if (dbResponse.Count == 0) { response.ResponseCode = ReturnCodesConstant.R06; response.ResponseMessage = ReturnCodesConstant.R06Message; return(response); } else { response.ResponseCode = ReturnCodesConstant.R00; response.ResponseMessage = ReturnCodesConstant.R00Message; response.ResponseData = dbResponse; return(response); } }