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