public ViewResult Create(Guid carId)
        {
            FinancialInfoCreateViewModel model = new FinancialInfoCreateViewModel
            {
                CarId = carId
            };

            return(View(model));
        }
 public IActionResult Create(FinancialInfoCreateViewModel model)
 {
     if (ModelState.IsValid)
     {
         FinancialInfo info = new FinancialInfo
         {
             CarId             = model.CarId,
             BankName          = model.BankName,
             LeaseType         = model.LeaseType,
             LeaseTime         = model.LeaseTime,
             LeaseStartDate    = model.LeaseStartDate,
             LeaseEndDate      = model.LeaseEndDate,
             StartNetPrice     = model.StartNetPrice,
             EndBuyoutNetPrice = model.EndBuyoutNetPrice,
             MonthlyLeaseFee   = model.MonthlyLeaseFee,
             Company           = model.Company,
             Id = new Guid()
         };
         _financialInfosRepository.Add(info);
         return(RedirectToAction("Details", new { id = info.Id }));
     }
     return(RedirectToAction("Create", new { carId = model.CarId }));
 }