using (_Database.POSTCODEEntities1 db = new _Database.POSTCODEEntities1())
{
var ds = (from pc in db.View_Postcode
select new
{
pc.Post_PostCode_ID,
pc.PostCode,
pc.Post_Amphur,
pc.Post_Province,
pc.Post_PostOffice,
pc.Note
}).ToList();
dataGridView1.AutoGenerateColumns = false;
// dataGridView1.AllowUserToAddRows = false;
dataGridView1.DataSource = ds;
static class Program1
{
public static void Main()
{
var count = 5;
var age = "more over";
var remain = (count, age);
Console.Write(remain); //result: 5 more over
Console.ReadKey();
}
}