Пример #1
0
        public async Task <IActionResult> CarDetail(CarViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var user = await _unitOfWork.GetUser(this.User);

            _unitOfWork.SaveCar(model, user);
            var usrCars = await _unitOfWork.GetUserCars(this.User);

            return(View("MyCars", usrCars));
        }