Example #1
0
        private IQueryable <dynamic> Find(int?id, string q)
        {
            var daoEstados = new DAOEstados();
            var list       = daoEstados.GetEstadosSelect(id, q);
            var select     = list.Select(u => new
            {
                id   = u.id,
                text = u.text,
                uf   = u.uf,
                Pais = new Sistema.Select.Paises.Select {
                    id   = u.PaisSelect.id,
                    text = u.PaisSelect.text
                },
                dtCadastro     = u.dtCadastro,
                dtUltAlteracao = u.dtUltAlteracao
            }).OrderBy(u => u.text).ToList();

            return(select.AsQueryable());
        }