© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
29 replies
Krotti

✅ Question regarding EntityFramework

I have basically always made all of my models with Id's and then if it relates to another model, then include something like UserId.

I asked chatGPT to generate the skeleton for the DbContext and the models it had that stored UserId also had "public User user". I decided to check if this is a thing and apparently yeah it is. Does EFCore recognize the relation with that and how does it save it into a database? I am very confused and I can't find a proper example.
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

Question regarding tasks
C#CC# / help
2y ago
Question regarding thread safety
C#CC# / help
2y ago
Question regarding learning.. stuff.
C#CC# / help
3y ago
EntityFramework & Supabase
C#CC# / help
2y ago