LINQ to SQL : Change in DataContext from Beta 1 to Beta 2

LINQ to SQL : Change in DataContext from Beta 1 to Beta 2

  • Comments 2

During the demonstration I have noticed that two major methods of DataContext has changed from Beta 1 to Beta 2.


First one, is the new name for the class DataShape(). Now there is no class called DataShape() but we have DataLoadOptions().



var loadOption = new DataLoadOptions();           

loadOption.LoadWith<Customer>(c => c.Orders);


db.LoadOptions = loadOption;




DataContext does not have any method called GetQueryText() it got changed to GetCommand().


Please let me know if you find something else. I will update this entry.



Leave a Comment
  • Please add 4 and 8 and type the answer here:
  • Post
  • PingBack from

  • I'm trying to load a table that referrences itself without deferred loading.

    I'm getting an exception of:

    System.InvalidOperationException was unhandled

     Message="Cycles not allowed in LoadOptions LoadWith type graph."


     StackTrace: ...

    The current code looks like:

    db.LoadOptions = new DataLoadOptions();

    db.LoadOptions.LoadWith<View>(v => v.View_Views);

    Is there a limitation with self-referrencing tables?

Page 1 of 1 (2 items)