Example #1
0
 public TEntity GetById(Func <TEntity, bool> predicate)
 {
     // return dbset.//entities.Contacts.FirstOrDefault(predicate);
     return(context.Set <TEntity>().FirstOrDefault(predicate));
 }
Example #2
0
 public BaseRepository(NhlContext context)
 {
     this.context = context;
     dbset        = context.Set <TEntity>();
 }