示例#1
0
 private void buttonShowStudents_Click(object sender, EventArgs e)
 {
     dataGridViewStudents.DataSource = null;
     dataGridViewStudents.DataSource = _userQuery.UserWithAddressByName(textBoxStudentName.Text.ToString())
                                       .Select(x => new
     {
         Imię        = x.Name,
         Nazwisko    = x.Surname,
         Miasto      = x.Address.City,
         KodPocztowy = x.Address.PostCode
     })
                                       .ToList();
 }