per esempio,io ho gia composto una classe inerente al db e ho scritto il codice che segue.Come faccio a compilare la tabella con i dati del db?
namespace world
{
public partial class Form1 : Form
{
static List<city> Lista = new List<city>();
public Form1()
{
InitializeComponent();
}
private void AddCity(int ID, string Nome, string CountryCode, string Distretto, int Popolazione)
{
Lista.Add(new city()
{
ID1 = ID,
Name1 = Nome,
CountryCode1 = CountryCode,
District1 = Distretto,
Population1 = Popolazione
});
}
}
}