Posted By

housecor on 10/28/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Tyster


Late eager loading of a record using load() method in LINQ


 / Published in: C#
 

  1. var addresses = from a in context.Addresses select a;
  2. foreach (var address in addresses)
  3. {
  4. if (address.CountryRegion != null)
  5. {
  6. if (address.CountryRegion.Trim() == "UK")
  7. {
  8. address.ContactReference.Load();
  9. }
  10. }
  11. }

Report this snippet  

You need to login to post a comment.