private void PreencherIdCarro(MotoristaViewModel motoristaViewModel)
 {
     if (motoristaViewModel.IdCarro > 0)
     {
         motoristaViewModel.IdCarro = obterCarroQuery.Execute(motoristaViewModel.IdCarro).Id;
     }
 }
예제 #2
0
        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);
                }
            }
        }