Can someone tell me how to access the DbContext from an ActionFilterAttribute method

valuecom

New Member
I need to access the current db context in my \[code\]OnActionFilterExecuting\[/code\] method which receives \[code\]ActionExecutingContext\[/code\] parameter (filterContext). I can see it in my local stack while debugging but I don't know how to access it. I have tried:[*]\[code\]filterContext.Controller.db\[/code\][*]\[code\]filterContext.Controller(ftvcdl.Controllers.PartController).db\[/code\]Here is my debug trace: http://i.imgur.com/P7zu5.pngPS: I am new to C# so I don't fully understand the syntax or how to read the debug stack very well, although I am learning!
 
Back
Top