c# - Getting entity framework context in Linqpad? -


i've created dll assembly contains edmx northwind database.

i created reference dll through linqpad , see db , able run queries.

but - want test behavior of deferredloadingenabled property , need set via context variable.

eg

ctx.deferredloadingenabled = false; 

but how can access ctx?

linqpad generates me , , need access it.

in entity framework 5, equivalent property is:

ctx.configuration.lazyloadingenabled = false; 

if you're in linqpad, you're in context, can say:

configuration.lazyloadingenabled = false; 

but when i'm copying code visual studio linqpad, i'll add line @ top code works same:

var ctx = this; 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -