コード例 #1
0
        public void Delete(string userToDelete, UserAndOrganizationDTO userOrg)
        {
            var user = _usersDbSet
                       .Single(u =>
                               u.Id == userToDelete &&
                               u.OrganizationId == userOrg.OrganizationId);

            ClearUserKudos(user);
            UnassignUserFromWalls(userToDelete, userOrg.OrganizationId);
            _userManager.RemoveLogins(userToDelete);

            _usersDbSet.Remove(user);
            _uow.SaveChanges(userOrg.UserId);
        }