Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Getting the current DbContext from an object

$
0
0

My aspnet core app is using EFCore 2.1 for the ORM, but I'm struggling to find out how to get the context from which an object has been created.

So I want to have some extension methods which would chain off the current object, but it would be wasteful to create a NEW DbContext inside the extension (no?).

Steve


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>