Data contexts - Linq to SQL
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
精彩评论