/// <summary> /// Adds the car into your favourite database. /// </summary> /// <param name="carId">Car that wants to be added to favourites.</param> /// <returns></returns> public ActionResult AddToFavourites(string carId) { bool result = CarManager.AddToFavourites(carId, (string)Session["UserId"]); if (result) { TempData["message"] = "Car successfully added to your favourites."; } else { TempData["message"] = "There was something wrong about transaction. Probably you have this car already in your favourite list."; } return(RedirectToAction("FavouriteCars")); }