IntelliTect / IntelliTect/TestTools
DatabaseFixture<T> does not support generic options
- Vorherrschende Sprache
- C#
- Sterne
- 10
- Forks
- 4
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.