Excellent explanation with a very simple but useful example!
@remigiuszzalewski9 ай бұрын
Thank you Alejandro! 👋
@TuCominek4 ай бұрын
thanks for the explanation Remik, nice restaurant photo btw :D
@remigiuszzalewski4 ай бұрын
I’m happy that you’ve noticed that photo 😄
@fritzjimenez91096 ай бұрын
Oh nice! It automatically mapped the relationships. I thought you were going to do it via Configuration in the DB context. 🤔 Is there any difference if you do it via the OnModelCreating method? 😅
@remigiuszzalewski6 ай бұрын
Actually it depends on your needs and preferences 😁 if you have a simple relationship without any conditions and you would like to keep everything in models then there’s a way to go. If you need more advanced configurations that data annotations cannot handle or you need to apply configurations conditionally or through conventions that apply across multiple entity types then it’s better to set this up in OnModelCreating 😀