Using the Entity Framework in-memory DB for unit tests?
It might not be giving you the coverage you think it is 😢 …
Check out @shayrojansky‘s response from the recent Entity Framework FAQ community standup on why using the in-memory database might not be the best idea.
A screenshot from the segment is below.
… but basically the main reason why you wouldn’t want to use the in-memory DB is that it behaves different than your prod DB system. This means it won’t and can never give you the same amount of confidence in your tests compared to if you were to run your tests against the same DB platform used in prod.