© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
8 replies
Bric

Include child of nullable in EF Core

Hi,
I want an Activity which has a nullable HeaderGroupId in the db. After scaffolding the db to my project with ef core scaffold command, both the HeaderGroupId and the HeaderGroup of Activity are nullable (marked with ?). I'm okay with that, but when I want to include a child of this nullable HeaderGroup I get a warning and I don't understand how I'm supposed to avoid it.

What's the correct approach?
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

EF Core Nullable Foreign Key Relationship
C#CC# / help
7mo ago
✅ EF Core include only one property of collection
C#CC# / help
2y ago
❔ Selecting child tables using EF Core
C#CC# / help
3y ago
✅ How to handle complex Include in EF Core
C#CC# / help
2y ago