NHibernate的轻量级替代品 [英] Lightweight alternatives to NHibernate

查看:62
本文介绍了NHibernate的轻量级替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于所有依赖关系,NHibernate并不是非常适合我们的环境. (城堡,log4net等)

NHibernate is not really a good fit for our environment due to all the dependencies. (Castle, log4net etc.)

有没有好的轻巧的替代品?

Is there a good lightweight alternative?

对基于简单文件的数据库(如Access/SQLite/VistaDB)的支持至关重要.

Support for simple file based databases such as Access/SQLite/VistaDB is essential.

理想情况下,单个程序集中包含的仅引用.NET程序集的内容.如果仅需要.NET Framework 2.0或3.0,那就是一个好处.

Ideally, something contained in a single assembly that only references .NET assemblies. If it only requires .NET framework 2.0 or 3.0 that is a bonus.

推荐答案

通常来说,要使数据库后端与.net一起使用,您需要为其提供ADO.Net提供程序.

Generally speaking, for your database backend to work with .net you need an ADO.Net provider for it.

对于MS Access(Jet),提供程序随附.net. 对于SQLite,有一个自包含的ADO.Net Provider.

For MS Access (Jet), the Provider is shipped with .net. For SQLite, there is a selfcontained ADO.Net Provider.

对于数据访问层库,如果要通过ADO.Net进行抽象:

As for the data access layer lib, if you want some abstraction over ADO.Net:

  • MS Data Access Application Block, a part of ms enterprise library.
  • iBatis.Net (Was retired by the Apache Foundation in 2010) MyBatis.net
  • ADOTemplate from the Spring Framework.net

从Framework 2.0及更高版本开始,所有这些方法都能正常工作.

All those work well starting with framework 2.0 and up.

基本上,选择(并且有很多选择)

Basically, you choose (and there is a lot of choices)

这篇关于NHibernate的轻量级替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆