title: Newbie Linq to SQL correct way to map to POCO?
body: <p>With a fair bit of embarrassment, I wish to ask / determine the best way to map a Linq-To-SQL query to a POCO. I am not in a position to use EF at the moment, so sticking with Linq-To-SQL.</p>
  
  <p>As of now, I have a simple class as follows:</p>
  
  <pre><code>public class DiaryEvent
  {
      public Int64 ID { get; set; }
      public string ResourceCalendarID { get; set; }
      public string EventTitle { get; set; }
      public string Location { get; set; }
      public DateTime StartDate { get; set; }
      public DateTime EndDate { get; set; }
      public string Description { get; set; }
      public string ResourceColour { get; set; }
      public bool AllDay { get; set; }
  }
  </code></pre>
  
  <p>My Linq-to-SQL (LTS) query is as follows:</p>
  
  <pre><code>DataClassesDataContext db = new DataClassesDataContext();
  var qry =
           from b in db.bookings
           select b
  </code></pre>
  
  <p>Because the database table bookings isn't/can't be created exactly as my DiaryEvent class, I am currently iterating over b like:</p>
  
  <pre><code>List&lt;DiaryEvent&gt; EventList = new List&lt;DiaryEvent&gt;();
  foreach (booking item in qry)
  {
      EventList.Add(new DiaryEvent
      {
          AllDay = false,
          Description = item.bookingDescription,
          ID = item.bookingID,
          StartDate = (DateTime)item.startDate,
          EndDate = (DateTime)item.endDate,
          EventTitle = item.bookingName,
          Location = item.bookingLocation,
          ResourceCalendarID = item.resourceID.ToString(),
          ResourceColour = item.bookingColour.Trim()
      });
  }
  </code></pre>
  
  <p>This maps my data correctly, however I am not sure if this is the fastest/most correct way to achieve this?
  I would be grateful for any feedback as to confirming if the above technique is acceptable, or if there are ways to improve upon that?</p>
  
  <p>P.S:  In fairness, there isn't going to be massive amounts of data to retrieve.. maybe a few hundred rows in any given circumstance.</p>
  
  <p>Thanks in advance!</p>