Exemple #1
0
 /// <summary>
 ///增加
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public T AddEntity(T entity)
 {
     Db.Set <T>().Add(entity);
     Db.SaveChanges();
     return(entity);
 }
Exemple #2
0
        //添加用户信息
        public T Addentity(T entry)
        {
            T Userinfo = db.Set <T>().Add(entry);

            return(entry);
        }