Trying to figure out how to get the context during the test
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Controllers
Migrations
Properties
wwwroot
.gitignore
ASPNET5_EF7_Test.sln
ASPNET5_EF7_Test.xproj
README.md
Startup.cs
TestContext.cs
TestContextFactory.cs
Tests.cs
User.cs
_config.yml
appsettings.json
project.json
project.lock.json

README.md

ASP MVC 5, Entity Framework and Unit Testing

Basically I am trying to figure out how to get a reference to the database context during the testing of a controller that is using service injection.

When injecting the database context for a test how would one get ahold of the in memory database and add data to it so you could fully exersize the controller method.