Closed keyuxuan closed 9 months ago
It seems like you're trying to use the SQL Server temporal table support with the SQLite provider - that isn't supported.
yeah we understand SQLite does not support temporal table, but before and after our EF version upgrade, we always use SQLite as our unit test database provider, and we always have to call this code block
var validSignatureIds =
await dbContext.SignatureValidations
.TemporalAsOf(dateValue)
.Where(x => x.Result == Database.Enumerations.SignatureValidationResult.Valid)
.Select(x => x.SignatureId)
.ToListAsync();
why is this issue (test failing) only happening after upgrading to ef core 7?
This really should not have worked with SQLite, at any point - please double-check that the test was actually running with SQLite, etc.
Ask a question
Recently we upgrade from EF6 to EF7, some unit tests start to fail. We are using SQLite as database provider for those unit tests. All those failed tests need to access one table called
SignatureValidation
in DB which could be a temporal table, but we have specified inDbContext.cs
file that only to create that table as temporal if database is sql server, like this:When tests are running, tests need to run/go through this code block, and I found out
.TemporalAsOf(dateValue)
statement is the one causing the problem. (if i remove.TemporalAsOf(dateValue)
, those tests will not fail)Curious do you have any insights what is happening here and how to fix it so that tests wont fail? Those failing tests used to work fine before upgrading EF version.
Include stack traces
Include provider and version information
EF Core version: EF7 Database provider: SQLite Target framework: NET 6.0 Operating system: Windows IDE: Visual Studio 2022 17.7.7