I am wanting to get ahold of the Context that I am injecting into the controllers during testing and modify the data in the "in memory" version of the database context....So the controller looks like this ...[Route("api/[controller]")]
public class TestCo...
I successfully injected dependencies using Moq in my unit test project. But for the integration testI would like to interact with the database. So I canot fake the repositories/ dependencies. I am having trouble how to achieve such thing in seperate class...
I have a method that uses Entity Framework to call a stored proc, the stored proc returns some data....Something like the following ...public async Task<IActionResult> Get(int customerId)
{
List<Product> products = _context.Products.FromSql("EXECUTE db...
Is it possible to have an InMemory database (ASP.NET Core) that is shared across multiple DbContexts? It seems that each DbContext type keeps its own database, even when the same database name is specified in UseInMemoryDatabase.