示例#1
0
        public GenericRepository(DbEntities context, Expression <Func <TEntity, bool> > filter)
        {
            //: Object reference not set to an instance of an object.
            this._Context = context;

            this._DbSet        = context.Set <TEntity>();
            this._GlobalFilter = filter;
            this.MatchesFilter = filter.Compile();
        }
示例#2
0
 public GenericRepository(DbEntities context)
 {
     this._Context = context;
     this._DbSet   = context.Set <TEntity>();
 }