You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I' m using InMemoryDatabase for testing purposes (e.g. integration tests) in EF Core 6.0 and was wondering if there is any support for temporal tables?
Specifically, I have an integration test in which some rows of a table are updated several times. At the end I have to count the different column values of a specific entity.
@mhoerandner InMemory is specifically not about integration testing, but rather unit testing. For integration testing, you'll have to test against SQL Server - we have some docs being prepared with guidelines on how to do that.
InMemory does not behave like SQL Server (e.g. temporal tables, transactions) and it isn't possible to make it do that.
@mhoerandner InMemory is specifically not about integration testing, but rather unit testing. For integration testing, you'll have to test against SQL Server - we have some docs being prepared with guidelines on how to do that.
InMemory does not behave like SQL Server (e.g. temporal tables, transactions) and it isn't possible to make it do that.
Thanks for the clarification. I could see from your PR3539 that you clearly differentiate between end-to-end and integration testing. In addition, your "recommendation" about using in-memory for testing has changed from "... can be useful..." to "... is discouraged".
So far I thought a fake database like in-memory would be well suited for my tests (end-to-end tests via WebApplicationFactory) because it is lightweight (e.g. no SQL server required on the build server) and for my previous (very simple) use cases it was sufficient.
Anyway, now I know and will use SQL Server for testing as well.
Thank you very much.
Temporal Tables support for InMemoryDatabase
I' m using
InMemoryDatabase
for testing purposes (e.g. integration tests) in EF Core 6.0 and was wondering if there is any support fortemporal tables
?Specifically, I have an integration test in which some rows of a table are updated several times. At the end I have to count the different column values of a specific entity.
Something like this:
Unfortunately the method always returns 1, as if there is no real implementation for temporal tables in
InMemoryDatabase
?The text was updated successfully, but these errors were encountered: