Ejemplo n.º 1
0
 public IEnumerable <RoleDbModel> RecordList(string filter)
 {
     using (ConstructoraUdcDBEntities db = new ConstructoraUdcDBEntities())
     {
         var listaLinq = from role in db.SEC_Role
                         where !role.removed && role.name.ToUpper().Contains(filter.ToUpper())
                         select role;
         RoleModelMapper mapper     = new RoleModelMapper();
         var             listaFinal = mapper.MapperT1T2(listaLinq);
         return(listaFinal);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public IEnumerable <RoleDbModel> RecordList(string filter)
        {
            using (DesarrolloDocenteBDEntities db = new DesarrolloDocenteBDEntities())
            {
                //var listaLambda = db.SEC_ROLE.Where(x => !x.REMOVED && x.NAME.ToUpper().Contains(filter.ToUpper())).ToList();

                var listaLinq = from role in db.SEC_ROLE
                                where !role.REMOVED && role.NAME.ToUpper().Contains(filter.ToUpper())
                                select role;

                RoleModelMapper mapper     = new RoleModelMapper();
                var             listaFinal = mapper.MapperT1T2(listaLinq);

                return(listaFinal);
            }
        }