13
There are the following Objects:
public class Objeto1
{
public List<Objeto2> PropObj1 {get; set;}
}
public class Objeto2
{
public List<Objeto3> PropObj2 {get; set;}
}
public class Objeto3
{
public int PropObj3 {get; set;}
}
I have a List of Object1 and I need to get a filtered list of Object 1, only those who possess the Propobj3 == 1:
List<Objeto1> listaObj1 = new List<Objeto1>();
// Suponhamos que listaObj1 já possui valores inseridos.
var resultado = listaObj1.Where(o1 => o1.PropObj1... ).ToList();
In this case, what would the expression lambda look like?
I’m using Entity Framework.
É Entity Framework?
– Leonel Sanches da Silva
@Ciganomorrisonmendez is Entity Framework yes, I forgot to put...
– Jedaias Rodrigues