dotnet / dotnet/AspNetCore.Docs
New topic: Getting the DbContext outside of a Controller
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
- [ ] Getting the DbContext outside of a Controller
- [ ] Accessing scoped services outside of an HTTP request.
per @davidfowl
There's enough confusion here that I think we should have a first class topic for it on the EF docs:
https://www.reddit.com/r/dotnet/comments/7cednh/how_to_grab_a_dbcontext_from_outside_a_controller/
We should probably also have something on accessing scoped services outside of an http request.
Can one of @ajcvickers or @divega provide the sample for *Getting the DbContext outside of a Controller*?
@rynowak @danroth27 who's the contact for _Accessing scoped services outside of an HTTP request?_
Contributor guide
Assessment
This issue has not been assessed yet.