I
imbirek8
Hi,
When I do:
DataClassesDataContext db = new DataClassesDataContext (connectionString);
//do some select, read data from result
var options = new DataLoadOptions();
options.LoadWith<User>(u => u.UserType);
db.LoadOptions = options; // exception
I have an exception:
"Setting load options is not allowed after results have been returned from a
query".
It ridiculous that I can't add another LoadOption after select. What should
I do ? Should I add every LoadOptions on the start of my aplication ? But
what if in one select I would like to read User without UserType ?
Do you know any solution of this problem ?
When I do:
DataClassesDataContext db = new DataClassesDataContext (connectionString);
//do some select, read data from result
var options = new DataLoadOptions();
options.LoadWith<User>(u => u.UserType);
db.LoadOptions = options; // exception
I have an exception:
"Setting load options is not allowed after results have been returned from a
query".
It ridiculous that I can't add another LoadOption after select. What should
I do ? Should I add every LoadOptions on the start of my aplication ? But
what if in one select I would like to read User without UserType ?
Do you know any solution of this problem ?