public AddModel(VehicleStore vehicleStore, CustomerStore customerStore, InsuranceStore insuranceStore, InsurancesRules insurancesRules) { VehicleStore = vehicleStore; CustomerStore = customerStore; InsuranceStore = insuranceStore; InsurancesRules = insurancesRules; }
public void OnGet(Guid vehicleid) { Vehicle = VehicleStore.GetVehiclesById(vehicleid); Customer = CustomerStore.GetCustomerById(Vehicle.CustomerId); idCustomer = Customer.Id; idVehicle = Vehicle.Id; City = Customer.City; Insurance = InsurancesRules.GetPrice(idCustomer, idVehicle); Age = DateTime.Today.AddTicks(-Customer.BornDate.Ticks).Year - 1; }