public DriverProfileModel GetDriverModel(Driver driver , List<History> history) { DriverProfileModel dpm = new DriverProfileModel { Id = driver.Id, Name = driver.Name, Surname = driver.Surname, Middlename = driver.MiddleName, Phone = driver.Phone, Login = driver.Login, LicenseNumber = driver.LicenseNum, LicenseValidDate = driver.LicenseValidDate, CarBrand = driver.Car.CarBrand, CarModel = driver.Car.CarModel, CarClass = driver.Car.CarClass, CarNumber = driver.Car.CarNumber, VehicleType = driver.Car.VehicleType, History = history }; return dpm; }