public void Delete(T entity) { if (entity == null) { throw new ArgumentNullException("entity"); } entities.Remove(entity); context.SaveChanges(); }
//public List<T> FindBy(Expression<Func<T, bool>> predicate, params Expression<Func<T, object>>[] includes) //{ //} public T Add(T entity) { db.Add(entity); context.SaveChanges(); return(entity); }