Ejemplo n.º 1
0
        public async Task <IEnumerable <AsycudaDocument> > GetAsycudaDocumentByCustoms_ProcedureId(string Customs_ProcedureId, List <string> includesLst = null)
        {
            if (Customs_ProcedureId == "0")
            {
                return(null);
            }
            try
            {
                using (AsycudaDocumentClient t = new AsycudaDocumentClient())
                {
                    var res = await t.GetAsycudaDocumentByCustoms_ProcedureId(Customs_ProcedureId, includesLst).ConfigureAwait(continueOnCapturedContext: false);

                    if (res != null)
                    {
                        return(res.Select(x => new AsycudaDocument(x)).AsEnumerable());
                    }
                    else
                    {
                        return(null);
                    }
                }
            }
            catch (FaultException <ValidationFault> e)
            {
                throw new Exception(e.Detail.Message, e.InnerException);
            }
            catch (Exception)
            {
                Debugger.Break();
                throw;
            }
        }