Posted on: 1/5/2015 2:09:34 AM | Views : 604

Hi
I would like to create a list within another list and shows the result!

Exemple:

namespace Modelo { public class MLPlanos { public int Pla_Cod { get; set; } public int PlaDes_Cod { get; set; } public string Pla_Nome { get; set; } public string PlaCat_Nome { get; set; } public string Ser_Nome { get; set; } public string Pla_Valor { get; set; } public string SerTip_Nome { get; set; }
public virtual List<MLPlanosServicos> Servicos { get; set; } }
public class MLPlanosServicos { public string Ser_Nome { get; set; } public string SerTip_Nome { get; set; }
} }

public List<MLPlanos> ListarPlanos() {
List<MLPlanos> listaRetorno = new List<MLPlanos>(); List<MLPlanosServicos> listaRetorno2 = new List<MLPlanosServicos>();
using (SqlConnection objConexao = new SqlConnection ...

Go to the complete details ...