public class Vigencia
{
public DateTime DataInicialVigencia { get; set; }
public DateTime DataFinalVigencia { get; set; }
public Guid VeiculoId { get; set; }
public Guid RastreadorId { get; set; }
}
public class Veiculo
{
public Guid Id { get; set; }
public string Marca { get; set; }
public string Modelo { get; set; }
public string Placa { get; set; }
}
public class Rastreador
{
public Guid Id { get; set; }
public string NumeroSerie { get; set; }
}
public interface IRastreador
{
Rastreador ObterRastredorPorId(Guid Id);
}
public interface IVeiculo
{
Rastreador ObterVeiculoPorId(Guid Id);
}
public class ClienteViewModel
{
public string Marca { get; set; }
public string Modelo { get; set; }
public string Placa { get; set; }
public List<Vigencia> ListVigencia { get; set; }
}
How do I map the ClienteViewModel class using Automapper?
Note: Interfaces are already implemented using SimpleInjector as an IoC containner.