Suggest a simple ORM on .NET - design for maintaining legacy apps

人走茶凉 提交于 2019-12-05 11:10:01

Have a look at Rob Conery's Massive. It's simple and appears easy to use. It looks like it requires .NET 4, though.

SubSonic is fairly easy to use. LINQ to SQL is a good choice too. Also, take a look at http://www.codeproject.com/KB/database/LightORMLibrary.aspx.

I suggest you to use PetaPoco, the quite fresh ORM with easy to learn line.

From authors site:

PetaPoco was original inspired by Rob Conery's Massive project but for use with non-dynamic POCO objects. It came about because I was finding many of my projects that used SubSonic/Linq were slow or becoming mixed bags of Linq and CodingHorror.

I needed a data acess layer that was tiny, fast, easy to use and could run on .NET 3.5 and/or Mono 2.6 (ie: no support for dynamic expandos). Rob's claim of Massive being only 400 lines of code intruiged me and I wondered if something similar could be done without dynamics.

I used Subsonic in .NET 2.0 projects and it was nice. Unfortunately, it seems, it is not developed anymore.

NHibernate may be something to look into also, though personally I didn't like the original Java Hibernate very much, but that was years ago. I also use SubSonic on a regular basis. The latest SubSonic is more Linq oriented, but look specifically at its "ActiveRecord" capability. I think it covers the object-based stuff that you are trying to do. Development on SubSonic doesn't happen much any more, other than occasional bug fixes, but it is open source, and there is a Google group for support questions. It also supports a good number of databases, since you didn't mention what DB you are using.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!