title: How to convert LINQ query result to list and return generic List?
body: <p>I used generic ORM list
  example. </p>
  
  <p>This is my table. </p>
  
  <pre><code>Person table
  
  Guid
  Name
  LastName
  </code></pre>
  
  <p>and this is my struct class.</p>
  
  <pre><code> public struct PersonItem   // database and class field names are the same
      {
          public Guid   Guid{ get; set; } 
          public string Name { get; set; }
          public string LastName { get; set; }
      }
  
  
    public struct PersonItems
      {
          public PersonItems()
          {
              Items = new List&lt;PersonItem&gt;();
          }
  
          public List&lt;PersonItem&gt; Items { get; set; }
      }
  </code></pre>
  
  <p>I'm using such and no problem but I always have to write field's</p>
  
  <pre><code>public PersonItems GetPersons()
          {
              var query = (from p in _DbEntities.t_Crew
                           select p).ToList();
  
              if (query != null)
              {
                  foreach (var item in query)
                  {
                      _PersonItems.Items.Add(new PersonItem
                          {
                              Guid = item.Guid,
                              Name = item.Name,
                              LastName = item.LastName
  
                          });
                  }
              }
  
              return _PersonItems;
  
          }   
  
  
     public PersonItems GetPersons()
      {
          PersonItems personItems = new PersonItems();
  
          var query = from p in _DbEntities.t_Person
                      select p; &gt;&gt; this here query I need to convert linq query result to list
  
         personItems = query.ToList();
         return personItems ;
      }
  
  error
  </code></pre>
  
  <p>Cannot implicitly convert type System.Collections.Generic.List' to PersonData.PersonItems'.   </p>