-1
I have the following structure:
public class Insumo{
public int Insumo_id { get; set; }
public List<InsumoDados> Dados{ get; set; }
}
public class InsumoDados{
public int Desc { get; set; }
public decimal Valor{ get; set; }
}
I need to make an appointment at the bank so she can already return me a list of class Input. Preferably one with Lynne. Something like:
var listInsumo = (from insumo in banco.orc_insumo
select new Insumo
{
Insumo_id = insumo.insumo_id,
.
.
.
Can anyone help me? Thank you.
You created
DbSet
ofInsumo
andInsumoDados
?– Barbetta
I did create @Barbetta
– Leandro Belo
If it works out later, I’ll give you an answer. Try it this way:
var lista = seuContexto.Insumos.Include(p=> p.Dados).ToList();
– Barbetta