Confusion between DTOs (linq2sql) and Class objects!

后端 未结 4 442
遥遥无期
遥遥无期 2021-01-03 00:45

i have been successfully working with linq2sql and the linq DTOs (the classes that are created by linq2sql) ....

I am confused, i have the task of updating an old ap

4条回答
  •  天涯浪人
    2021-01-03 01:13

    This is one of the best discussions of the topic that I've seen:

    http://blog.wekeroad.com/blog/linqtosql-momma-said-knock-you-out/

    In the end, coupling and cohesion decisions are situational and you have to decide what is best for your situation.

    When your application outgrows LinqToSql, how easy will it be to yank out LinqToSql and insert another ORM in it's place? That is something you have to give serious thought to.

    In general, minimize the knowledge your business layer has about LinqToSql. LinqToSql should be completely hidden from your UI layer (your business layer makes up a good chunk of this shield). It's very easy to go down the wrong architectual path with LinqToSql and it can be very difficult to get back on the right path after the fact.

提交回复
热议问题