LINQ to SQL : Change in DataContext from Beta 1 to Beta 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;
Secondly,
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.
Namoskar!!!
Comments
Anonymous
October 03, 2007
PingBack from http://www.artofbam.com/wordpress/?p=5043Anonymous
November 02, 2007
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." Source="System.Data.Linq" 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?