public List <TwitImage> GetAll(Expression <Func <TwitImage, bool> > predicate)
 {
     try
     {
         IQueryable <TwitImage> dbQuery = _twitsContext.Set <TwitImage>();
         var res = dbQuery.Where(predicate).ToList();
         return(res);
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
Esempio n. 2
0
        public List <Twitt> GetAll(Expression <Func <Twitt, bool> > predicate)
        {
            try
            {
                List <Twitt>       list;
                IQueryable <Twitt> dbQuery = _twitsContext.Set <Twitt>();


                list = dbQuery.Where(predicate).ToList();

                return(list);
            }
            catch (Exception exp)
            {
                throw exp;
            }
        }