public TEntity Get(string id) { try { return(Context.Set <TEntity>().Find(id)); } catch (Exception) { return(null); } }
public void Add(TEntity entity) { Context.Set <TEntity>().Add(entity); }
public Repository(GymContext _db) { db = _db; dbSet = db.Set <T>(); }
public TEntity Get(int id) { return(_context.Set <TEntity>().Find(id)); }