3
I would like to return an object with your children, but I just wanted you to bring the children that corresponded to a certain condition. ex: I have the following classes:
public class Fornecedor
{
public int FornecedorID { get; set; }
public string CnpjCpf { get; set; }
public string RazaoSocial { get; set; }
public virtual ICollection<FornecedorContato> FornecedorContato { get; set; }
}
public class FornecedorContato
{
public int FornecedorContatoID { get; set; }
public int FornecedorID { get; set; }
public bool Ativo { get; set; }
}
In case I would like that within the list FornecedorContato
of Fornecedor
, return only the elements that are Ativos
How could I do that in a single?