示例#1
0
 public virtual void Delete(TEntity entityToDelete)
 {
     if (_context.Entry(entityToDelete).State == EntityState.Detached)
     {
         _dbSet.Attach(entityToDelete);
     }
     _dbSet.Remove(entityToDelete);
 }
示例#2
0
 public void UpdateUser(SysUser user)
 {
     context.Entry(user).State = EntityState.Modified;
 }