2
I have two classes :
public class Cliente
{
public int Id {get;set;
public string Nome { get; set; }
public string Email { get; set; }
public string Telefone { get; set; }
public string Celular { get; set; }
public virtual ICollection<Veiculo> Veiculos { get; set; }
}
public class Veiculo
{
public string Marca { get; set; }
public string Modelo { get; set; }
public int Ano { get; private set; }
public string Placa { get; set; }
}
I would like to consult with EF to pick up the amount of vehicles for each customer. In a single query.