Krotti
Krotti
CC#
Created by Krotti on 4/8/2023 in #help
✅ 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.
30 replies