I'm new to Entity Framework and Linq, so my question may be very simple, but it's breaking my head.
I have two entities:
public class Fornecedor
{
public int FornecedorId { get; set; }
public string Nome { get; set; }
public virtual ICollection<Municipio> Municipios { get; set; }
}
public class Municipio
{
public int MunicipioId { get; set; }
public string Nome { get; set; }
public virtual ICollection<Fornecedor> Fornecedores { get; set; }
}
I need to make an appointment to return all providers that serve a particular municipality. I will pass as parameter the name of the municipality, ex. São Paulo, and I need to receive a listing with all the suppliers that serve this municipality.
I hope I have been clear.
Thank you, Alexandre Previatti