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 make an inquiry with EF to get the number of vehicles for each customer. In a single query.