If you are ultimately crafting objects that span tables, this is true. You
also have to look at the goal of your DAL, as there is give and take for
every software problem. Be careful when you look at the problem through a
particular solution domain, as you might become a hammer seeking nails.
You can effectively set up a single table DBML and query it. It will
require more contexts and more hits on the database. This can affect scale
in a negative way, although Moore's law is on our side (not saying we
design for Moore's law). But it can also greatly improve maintainability,
as we can use a generic DAL (meaning using generics).
So the question is "what is your goal?"
1. Scalability
2. Availability
3. Maintainability
4. Performance
5. Security
You can say "all of the above", but remember that you will have to
compromise and you will find that the goal is not equal parts of all of
the above, but a weighted list. Then the compromise comes in.
My point is you are stuck in the problem and it may be harboring you from
finding a proper solution.
Possibly, but we are dealing with trade offs and perceptions here.
First, as mentioned, is the problem may be clouding the solution. Shifting
focus might yield that partial/inherit systems are not the only solution
and may, also, not be the proper solution ("best" solution).
Second, that the problem may not be hitting very many people. While
Microsoft should do things right, the definition of "right" is very loose.
In addition, they make money by hitting the 80% rather than the 20%. Until
enough people are impacted by the problem, or better yet "see it as a
problem", it is unlikely to be included.
Third, that the problem might be less pressing than other problems. This
also relates to 80-20, but from the other end of the spectrum.
Summary:
Based on what I have read about your issues, I am not sure LINQ should be
used to build a DAL in your case. I am not overly thrilled about LINQ as a
DAL anyway (although I have softened my hard line stance and blogged about
my reasoning). It sounds like you need custom classes. You may still
employ LINQ at some levels, but it sure sounds like you have fallen out of
the "drag and drop box".
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************