public T Add(T entity) { //Add the parameter object to the database dbContext.Set <T>().Add(entity); //Save changes to finalize the add dbContext.SaveChanges(); //Return the newly added entity return(entity); }
public List <T> GetAll() { return(_db.Set <T>().ToList()); }