Example Analysis of self-correlation Modeling in Entity Framework 4. 0
This article mainly introduces the Entity Framework 4.0 self-correlation modeling example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Establish a self-association for this table. The screenshot is as follows
1.Children Navigation Properties View
2.Parent Navigation Properties View
3. Associated view
4. Reference constraint
After completing the above steps, you can get the parent class through categoryEnt.Parent and the subclass through categoryEnt.Children.
Thank you for reading this article carefully. I hope the article "sample Analysis of Entity Framework 4.0 self-correlation Modeling" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!