asp.net - Per request lifetime of ApplicationDbContext -


cannot seem applicationdbcontext using code

httpcontext.getowincontext().get<applicationdbcontext>(); 

the error says no overloaded method get() uses 0 arguments. not sure parameter pass.

i trying use same applicationdbcontext owin has link to, instead of creating additional one.

the get() method without parameters defined extension method in microsoft.aspnet.identity.owin namespace. compile, add following using statement:

using microsoft.aspnet.identity.owin; 

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 -