Closed jakebushlack closed 1 year ago
@jakebushlack Can you post the SQL schema that you are scaffolding the entity types and context from?
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.
Starting with an existing DB, I have scaffolded the tables into entities and a new) -system-func((microsoft-entityframeworkcore-metadata-builders-entitytypebuilder-microsoft-entityframeworkcore-metadata-builders-referencecollectionbuilder))-system-action((microsoft-entityframeworkcore-metadata-builders-entitytypebuilder))))
at
IndexerProperty(String)
For more context: StackOverflow: EF Core-generated Collection navigation property throws InvalidOperationException: Nullable object must return a value on ASP.NET Core login
ApplicationDbContext
. When I configure the join entity in myApplicationDbContext
, I get anInvalidOperationException: Nullable object must have a value
on one of two IndexerProperty. I am attempting to extend IdentityUser as AspNetUser and introduceICollection
navigation properties for foreign relationships. And when I say that I'm attempting this, I mean that I used the EF Core CLI to scaffold all new entities, but as soon as I target my ApplicationDbContext, I lose the ability to register new identities or log in as a known user each time failing on UsingEntity(String, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, ActionI've checked for nullable columns and entity properties. I've made sure that all my data is sound. I'm not sure if this is more of an issue or a question, but I'm looking for some guidance what I may be doing wrong or need to change in my db context.
I've looked every day for a week on Stack Overflow, MS Docs, YouTube, etc to see if I'm missing anything from the db-first/reverse-engineering approach to EF Core. I haven't done anything more invasive than register my ApplicationDbContext and specify that
SignInManager
should useAspNetUser
instead ofIdentityUser
Stack trace:
Product versions: EF Core version: 6 Database provider: Microsoft.EntityFrameworkCore.SqlServer Target framework: .NET 6 Operating system: Windows 10 IDE: Jetbrains Rider