예제 #1
0
        //new
        public long GetCount <E>(Func <E, bool> match) where E : class
        {
            try
            {
                long      count = 0;
                DbSet <E> es    = context.Set <E>();
                if (es != null && es.LongCount() > 0)
                {
                    count = context.Set <E>().LongCount(match);
                }

                return(count);
            }
            catch (Exception)
            {
                throw;
            }
        }
 public GenericRepository(AttendanceEntities context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }