entity framework - Can I get at the DbContext created by LinqPad? -


i trying test irepository interface via linqpad. make 1 have constructor looks this:

irepository dataaccess = new genericrepository(dbcontext); 

this works fine in own code, don't know how @ dbcontext in linqpad. (i rather not create own if don't have to.

all code uses irepository (so can unit test). can't test in linqpad unless can make genericrepository using dbcontext.

any idea how can @ dbcontext linqpad creates?

i needed set connection ef connection. after use this keyword , worked.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -