Exemplo n.º 1
0
        internal static object Fetch(Type objectType, object criteria)
        {
            var dp = new DataPortal <object>();

            try
            {
                return(dp.DoFetchAsync(objectType, criteria, true).Result);
            }
            catch (AggregateException ex)
            {
                if (ex.InnerExceptions.Count > 0)
                {
                    throw ex.InnerExceptions[0];
                }
                else
                {
                    throw;
                }
            }
        }