Alternatives of persisting data using C#?

霸气de小男生 提交于 2019-12-24 07:14:11

问题


I have a small application in C#, and so far I have implemented it using data persistence classes that are running SQL directly, I understand there are better alternatives as Hibernate.NET and possibly Spring.NET. There are some other I forget? pros and cons? thanks!


回答1:


Here are a few of the more common ones:

  • LINQ to SQL
  • ADO.NET Entity Framework
  • NHibernate
  • Plain old ADO.NET
  • SubSonic

Spring.NET isn't really a dedicated data persistence framework. It's more of a IoC (Inversion of Control) framework, which gives you dependency injection, and a bunch of other stuff, including the ability to plug in a data persistence framework.

LINQ to SQL and SubSonic are probably the easiest to use and learn out of all of these. NHibernate and Entity Framework are more complex, but probably also more powerful and flexible than plain LINQ to SQL.



来源:https://stackoverflow.com/questions/1419336/alternatives-of-persisting-data-using-c

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