Ejemplo n.º 1
0
        public ExecuteResultEntity <ICollection <Contacts> > QueryAll()
        {
            try
            {
                var result = from p in repo.All()
                             where p.Void == false
                             orderby p.IsDefault ascending
                             select p;

                ExecuteResultEntity <ICollection <Contacts> > rtn = ExecuteResultEntity <ICollection <Contacts> > .CreateResultEntity(new Collection <Contacts>(result.ToList()));

                return(rtn);
            }
            catch (Exception ex)
            {
                return(ExecuteResultEntity <ICollection <Contacts> > .CreateErrorResultEntity(ex));
            }
        }