public Int32 SaveUser(UserDTO user)
        {
            Int32 id;
            if (user.Id == 0)
            {
                var profile = _unitOfWork.ProfileRepository.Create(new Profile()
                {
                    Email = user.Email,
                });

                var userGroup = _unitOfWork.UserGroupRepository.Read().Where(x => x.Name.Equals("BaseGroupForUsers")).FirstOrDefault();

                id = _unitOfWork.AccountRepository.Create(new Account()
                {
                    Password = user.Password,
                    Remember = false,
                    Username = user.Username,
                    Role = Role.User,
                    UserGroup = userGroup,
                    Profile = profile
                }).Id;
            }
            else
            {
                var us = _unitOfWork.AccountRepository.Read().Where(x => x.Id == user.Id).FirstOrDefault();
                us.Password = user.Password;
                us.Username = user.Username;
                us.Profile.Email = user.Email;
                id = us.Id;

                _unitOfWork.AccountRepository.Update(us);
            }
            _unitOfWork.SaveChanges();

            return id;
        }
 public Int32 SaveUser(UserDTO userGroup)
 {
     return _userManager.SaveUser(userGroup);
 }