/// <summary> /// Shows advanced details of a vehicle including its clock and damage history /// </summary> /// <param name="lPlate">liscence plate number</param> /// <returns>View</returns> public async Task <IActionResult> Details(string lPlate) { //Get vehicle details VehicleDTO dto = await _beService.GetVehicleAsync(lPlate); //Get Clock History for vehicle IEnumerable <ClockHistoryDTO> clkdtos = await _beService.GetClockHistoriesAsync(lPlate); //Get damage history for vehicle IEnumerable <DamageHistoryDTO> dmgdtos = await _beService.GetDamageAsync(lPlate); //Create model VehicleDetailModel model = VehicleDetailModel.CreateModel(dto, dmgdtos, clkdtos); return(View("VehicleDetails", model)); }