public async Task <IActionResult> DeleteUsersCar(UserCarsListWithViewModels model)
        {
            var carId    = model.Id;
            var password = model.Password;
            var user     = this.userServices.GetUserByCarId(carId);
            var admin    = await this.userManager.GetUserAsync(this.User);

            var isPasswordValid = false;

            if (password != null)
            {
                isPasswordValid = await userManager.CheckPasswordAsync(admin, password);
            }

            if (this.ModelState.IsValid && isPasswordValid)
            {
                await this.carServices.DeleteCarAsync(model.Id);


                return(this.RedirectToAction($"ListUserCars", "AdminUser", new { id = user.Id, username = user.UserName }));
            }
            else
            {
                if (isPasswordValid == false)
                {
                    ModelState.AddModelError(string.Empty, "Ivalid Password!");
                    return(this.RedirectToAction($"ListUserCars", "AdminUser", new { id = user.Id, username = user.UserName }));
                }
                else
                {
                    return(this.RedirectToAction($"ListUserCars", "AdminUser", new { id = user.Id, username = user.UserName }));
                }
            }
        }
        public IActionResult ListUserCars(string id, string username)
        {
            var carsFromDb = this.carServices.GetAllCarsForUserWithId(id);

            if (carsFromDb != null)
            {
                var cars = carsFromDb.Select(car => this.mapper.Map <UserCarsListingViewModel>(car));

                var carsBinding = new UserCarsListWithViewModels()
                {
                    Cars     = cars,
                    Username = username,
                    UserId   = id
                };

                return(this.View(carsBinding));
            }
            else
            {
                return(this.View());
            }
        }