Mocking an dbContext for fast integration tests

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Neefster
Posts: 1
Joined: Wed 01 May 2019 12:24

Mocking an dbContext for fast integration tests

Post by Neefster » Mon 01 Jul 2019 19:47

Hi,

Is there any way to create a dbContext that runs completely within memory? Something like the TVirtualTable functionality that SDAC has, but for Oracle? Thanks!

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Mocking an dbContext for fast integration tests

Post by Shalex » Thu 04 Jul 2019 19:48

You should specify .UseInMemoryDatabase() instead of .UseOracle() in your DbContextOptionsBuilder to work with InMemory provider: https://docs.microsoft.com/en-us/ef/cor ... /in-memory.

Post Reply