private void PreencherIdCarro(MotoristaViewModel motoristaViewModel) { if (motoristaViewModel.IdCarro > 0) { motoristaViewModel.IdCarro = obterCarroQuery.Execute(motoristaViewModel.IdCarro).Id; } }
private void PreencherCarro(MotoristaModel motorista) { if (motorista.Carro.Id > 0) { var carroViewModel = obterCarroQuery.Execute(motorista.Carro.Id); if (carroViewModel != null) { motorista.Carro = mapper.Map <CarroViewModel, CarroModel>(carroViewModel); } } }