TDD and ADO.NET Entity Framework

前端 未结 6 1091
夕颜
夕颜 2020-12-13 10:46

I\'ve been playing with ADO.NET Entity Framework lately, and I find that it suits my needs for a project I\'m developing. I also find cool its non-invasive nature.

A

6条回答
  •  旧时难觅i
    2020-12-13 11:24

    If you're looking specifically at DAL-generation tools you'll have a hard time integrating this with TDD. Most dal generation tools I know also generate your business objects and tightly couple them to the DAL making testing difficult.

    You can look at OR-mapping tools like nHibernate and maybe Linq to sql that enable "persistance ignorance", you can define your business objects yourself and they have no links to the DAL or any other infrastructure code. This makes testing your business logic seperately from your database much easier. I found it also enables other scenario's like occasionally connected clients far better.

提交回复
热议问题