public Store GetStoreByName(string name) { return(_db.Set <Store>().FirstOrDefault(s => s.Name == name)); }
public T GetAPizzaPartByName <T>(string name) where T : APizzaPart { return(_context.Set <T>().FirstOrDefault(part => part.Name == name)); }
public User GetUserByName(string name) { return(_context.Set <User>().ToList().FirstOrDefault(user => user.Name == name)); }
public TEntity Get(int id) { return(Context.Set <TEntity>().Find(id)); }
public void Add <T>(T item) where T : AEntity { _db.Set <T>().Add(item); }