I understand your doubts. I had the same thing when I started using LinqToSql. To help me find the best way, I started creating a personal project where I could test all approaches without anxiety and without prejudice.
During this exercise, I found that a single contextual approach is most useful. This solution seems to be easier to maintain, and if you need to recreate the domain, you will manage only one file in only one project.
Another aspect that I realized during the exercise is that using LinqToSql is directly inefficient in an organization. If you have a project in which the team will carry out development instead of one person, you must "protect" LinqToSql from them. There must be a “sheriff” that will handle the domain, and you should also use some abstraction mechanism to protect the model from abuse (I implemented the repository template and it worked fine, but you could find different approaches).
I also ran into the problem of creating some logical groups within the domain. Well, what I did was to use some DDD (Domain Driven Design) methods to create the so-called aggregates. Aggregates are a logical arrangement of objects within a domain where you have a root object (which acts as an aggregator) and several other satellite objects connected between them. You can do this by creating several new objects in the LinqToSql domain. These new objects will be disconnected from the database and will work as aggregators. This approach will allow you to create “subdomains” within your domain and help you have a better design.
In the end, I realized that the best way to use LinqToSql is to use context as a simple DAL. Reuse its domain with some extensions (where we can use T4 to help us create code), where entities are converted to DTO (data transfer objects) to bring data to other levels.
I am posting (not yet finished) the steps I took during the exercise on my blog: http://developmentnirvana.blogspot.com/
source share