Esempio n. 1
0
        public async Task <IEnumerable <xcuda_Supplementary_unit> > Getxcuda_Supplementary_unitByExpressionNav(string exp, Dictionary <string, string> navExp, List <string> includesLst = null)
        {
            if (System.ComponentModel.LicenseManager.UsageMode == LicenseUsageMode.Designtime || exp == null || exp == "None")
            {
                return(new List <xcuda_Supplementary_unit>().AsEnumerable());
            }
            try
            {
                using (var t = new xcuda_Supplementary_unitClient())
                {
                    IEnumerable <DTO.xcuda_Supplementary_unit> res = null;
                    if (exp == "All" && navExp.Count == 0)
                    {
                        res = await t.Getxcuda_Supplementary_unit(includesLst).ConfigureAwait(continueOnCapturedContext: false);
                    }
                    else
                    {
                        res = await t.Getxcuda_Supplementary_unitByExpressionNav(exp, navExp, includesLst).ConfigureAwait(continueOnCapturedContext: false);
                    }

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