IntelliTect / IntelliTect/TestTools
DatabaseFixture<T> does not support generic options
- Dominant language
- C#
- Stars
- 10
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction steps:
Create context with a single constructor that takes in the generic DbContextOptions
```C#
public class BudgetContext : DbContext
{
public BudgetContext(DbContextOptions options)
: base(options)
{ }
}
```
Attempt to use the DatabaseFixture.
```C#
var fixture = new DatabaseFixture();
await fixture.PerformDatabaseOperation(async context =>
{
...
});
```
Observed:
System.InvalidOperationException: '***.BudgetContext' must contain a constructor that has a single parameter of type 'Microsoft.EntityFrameworkCore.DbContextOptions'
Expected:
I want my DbContext to take in the generic options overload.
Contributor guide
Assessment
This issue has not been assessed yet.