I'm beginning to wonder if L2S is suitable for large projects. By a large project I mean a database containing many tables spread across many schemas. We would like our entities contained in namespaces that match our database schema names. We have database parent / child relationships that span across schemas. This means our parent / child entities will span across namespaces. L2S isn't able to handle this. In L2S, I cannot model a relationship that involves a parent in one namespace (.DBML) and a child in another namespace (.DBML); at least not without having to write a fair amount of custom code. But this partially defeats the purpose of using L2S.
So, we could put all our entities in a single namespace, which we don't want to do. Or we could write custom code in partial entity class to overcome the mo开发者_JAVA百科deling limitation. We don't particularly want to do this either.
How have others dealt with this?
Thanks.
I'm not experienced enough with L2S to comment, but that does seem a downer. Have you looked at Fluent NHibernate? That would alleviate your problems. You can also linq it :)
It appears as though the future of Linq 2 SQL is uncertain. Microsoft appears to be focussing on Entity Framework. I would be careful investing in Linq 2 SQL at this point. Better go with Entity Framework.
精彩评论