MockDbContext using In Memory Database breaks during xUnit Test when a temporal table is in the context

Connor Hicks 6 Reputation points

When scaffolding to create a dbcontext including a temporal table, the entity file created does not have the period start or period end columns, but they are set up in the context and can be accessed through EF.Property in Net6.

However, when accessing the MockDbContext from within the xUnit test, there is an error on the temporal table, saying that it expects the period start and end columns. This prevents me from successfully running any tests that use that context, even if i'm working with a different table.

Hoping for a workaround to this.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,267 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,943 questions
{count} vote