使用C#持久化数据的替代品?替代品、持久、数据

2023-09-06 08:42:25 作者:奇葩小小鱼

我在C#中的小应用程序,到目前为止,我还使用直接运行SQL数据持久化类来实现它,我知道有作为Hibernate.NET,可能Spring.NET更好的替代品。 还有一些其他的我忘了?利弊? 谢谢!

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!

推荐答案

下面是一些比较常见的:

Here are a few of the more common ones:

的LINQ to SQL ADO.NET实体框架 NHibernate的 在普通老式 ADO.NET 亚音速 LINQ to SQL ADO.NET Entity Framework NHibernate Plain old ADO.NET SubSonic

Spring.NET是不是一个真正的专用数据持久层框架。它更框架,它为您提供了依赖注入,和一堆其他的东西,包括数据持久层框架堵塞的能力。

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和亚音速可能是最容易学习和使用所有这些的。 NHibernate和实体框架是比较复杂的,但可能也更加强大和灵活的比普通的LINQ to SQL。

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.