6
I have two classes:
public class Produto
{
public int ProCodigo { get; set; }
public string ProNome { get; set; }
public int DepCodigo { get; set; }
public virtual Departamento Departamento { get; set; }
}
public class Departamento
{
public int DepCodigo { get; set; }
public string DepNome { get; set; }
}
If I make two lists: one of products (where the department object within the product is empty) and another of departments, is it possible to relate them? For example, create another list of products with the department objects within the product?
Thank you!
you said you get the list as json, have an example of json and which library you use to deserialize? Maybe at the time of doing this you can already assemble the list with the right relationships more efficiently.
– Bruno Piovan