public int Add(T t) { //Set<T>()等于Students RemoveHoldingEntityInContext(t); db.Set <T>().Add(t); return(db.SaveChanges()); }
public int Add(T t) { //Set<T>()等于Students db.Set <T>().Add(t); return(db.SaveChanges()); }