//Admin creates the home
        public async Task CreateNewHomeAsync(UserModel user, HomeModel home)
        {
            if (user.Position != (int)UserPosition.HasNotHome)
            {
                CustomException errors = new CustomException((int)HttpStatusCode.BadRequest);
                errors.AddError("User Has Home", "User has home already");
                errors.Throw();
            }

            var isHomeExist = await _homeRepository.GetByHomeNameAsync(home.Name);

            if (isHomeExist != null)
            {
                CustomException errors = new CustomException((int)HttpStatusCode.BadRequest);
                errors.AddError("Home Name Exist", "Home name has already exist");
                errors.Throw();
            }

            user.Position = (int)UserPosition.Admin;

            home.Admin = user;
            home.Users = new List <UserModel>();
            home.Users.Add(user);
            _homeRepository.Insert(home);

            user.Home = home;
            _userRepository.Update(user);

            _shoppingListRepository.Insert(new ShoppingListModel(home));
        }