开发者

Data contexts - Linq to SQL

开发者 https://www.devze.com 2023-02-23 23:24 出处:网络
No one has taught me how to use these, and I can\'t find much on how I should be using them 开发者_如何学Goproperly.

No one has taught me how to use these, and I can't find much on how I should be using them 开发者_如何学Goproperly.

At the moment I say have a data context for my users, user details, user profiles etc. I then have a separate one for my help centre, holding tickets, ticket replies and ticket attachments etc.

Is this correct? Should I be splitting them like this? I cant create an association between two data contexts apparently in the designer. Should all tables be in just one data context? Any benefit to splitting them up? The tables in them are not fully independent of each other.


Have a look here at another Stackoverflow question: Linq-to-SQL: how many datacontexts?

Summary: just use one datacontext for you entire DB

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号