Ejemplo n.º 1
0
        public bool Delete(string userId)
        {
            bool result = false;

            UserProfile profile = UserProfile.GetByUserId(userId);
            if (profile != null)
            {
                int addressId = profile.AddressId;
                profile.Delete();

                Address addr = Address.GetById(addressId);
                addr.Delete();
            }
            UserRole roles = new UserRole();
            roles.DeleteUserRoles(userId);

            result = deleteUser(userId);

            return result;
        }