Lisa
✅ Nested Record Inheritance
I'm trying a bit of inheritance shenanigans, the API I'm working with wraps everything in a data object, which usually has two fields that always appear:
This way I can keep a base record for when I need to access cooldown/character in a generic method, but I can still the define the fields that are different:
However, I get an error:
0>FightResult.cs(6,43): Error CS8866 : Record member 'Artifacts.Model.Characters.CharacterActionResult.Data' must be a readable instance property or field of type 'Artifacts.Model.Characters.FightResultData' to match positional parameter 'Data'.
Am I looking over something?19 replies
✅ Unable to create migration - 'Unable to resolve service for type 'DbContextOptions'
This is my first time creating migrations (never had a need until now), so please bear with me.
I'm trying to use
dotnet ef migrations add AMigrationName
to add a migration to my project, However, I get this error:
My startup looks like this:
And ConfigureDbContext is just:
My databasecontext looks like this:
What am I missing? How can I make sure the migration creator can access my dbcontextoptions at design time?2 replies