In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "linq to sql multi-table how to achieve", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "linq to sql multi-table how to achieve" it!
Before we talk about linq to sql multi-tables, let's take a look at the constructors of the two generated entity classes:
one. Categories classes of linq to sql multiple tables
Public Categories () {this._Products = new EntitySet (new Action (this.attach_Products), new Action (this.detach_Products); OnCreated ();}
two. Products classes of linq to sql multiple tables
Public Products () {this._Order_Details = new EntitySet (new Action (this.attach_Order_Details), new Action (this.detach_Order_Details)); this._Categories = default (EntityRef); this._Suppliers = default (EntityRef); OnCreated ();}
Comparing the generated constructor, we use EntitySet class and EntityRef class to implement E-one-to-many relation (One-to-Many) and one-to-one relation (one-to-one) respectively.
While you are querying a product entity and you want to get the category of the product, you can directly get the linq to sql multi-table.
P=new products (); p.categories.categories.categoriesnameategoryNamentityRef thank you for your reading, the above is the content of "how to achieve linq to sql multi-table", after the study of this article, I believe you have a deeper understanding of how to achieve this problem of linq to sql multi-table, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.