Esempio n. 1
0
File: DaoBase.cs Progetto: Pefore/HR
 public int Add(T t)
 {
     //Set<T>()等于Students
     RemoveHoldingEntityInContext(t);
     db.Set <T>().Add(t);
     return(db.SaveChanges());
 }
Esempio n. 2
0
        public int Add(T t)
        {
            //Set<T>()等于Students
            db.Set <T>().Add(t);

            return(db.SaveChanges());
        }