c# - How to Convert DataLoadOptions to human readable string? -


i'm trying debug faulting process. error occurs when our linq sql data context has loadoptions updated. there way convert value of dataloadoptions object human readable text?

here's error message:

exception (invalidoperationexception):     setting load options not allowed after results have been returned query. inner exception: stacktrace:     @ system.data.linq.datacontext.set_loadoptions(dataloadoptions value) 

here's code:

if (loadoptions != null) {     try     {         domain.loadoptions = loadoptions;     }     catch (exception ex)     {         // log , continue         logmanager.save(log.types.error, ex);         logmanager.save(log.types.warning, "error setting datacontext loadoptions, related data may not loaded.");     } } 

the method code above called other places, may pass in dataloadoption object. if present, dataloadoption object's loadwith method have been called @ least once, , possibly associatewith method.

to assist debugging, i'd write loadwith , associatewith options our logs. alternatively, me determine chain of calls leading method help, i'm sure linq sql datacontext being used prior calling method. (in above code domain our datacontext.)


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -