title: wpf: how to insert first row of table into textbox
body: <p>I had a DataGrid and below it some TextBoxes in my WPF project. I decided to clean the DatGrid but still remain for TextBoxes like below:</p>
  
  <p><a href="https://i.stack.imgur.com/pQHJ3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pQHJ3.jpg" alt="enter image description here"></a></p>
  
  <p>I use this code when I had DataGrid:</p>
  
  <pre><code>var query = (from d1 in database.vw_Employee
                  select new
                  {
                      d1.EmpID,
                      d1.EmpFName,
                      d1.EmpLName,
                      d1.EmpTitle,
                  }).ToList().First();
  
  txt_IdEmp.Text = query.EmpID.ToString();
  txt_FNameEmp.Text = query.EmpFName;
  txt_LNameEmp.Text = query.EmpLName;
  txt_TitleEmp.Text = query.EmpTitle;
  </code></pre>
  
  <p>So I hope it works without DataGrid and insert first row of table into TextBox but no work for me. What's wrong?</p>