nhibernate
-
It is amazing how much development time is saved by using NHibernate .
真不知道使用NHibernate将为我们节省多少开发时间。
-
So how does NHibernate know which table to use ?
但是NHibernate是怎么知道使用哪个表的呢?
-
Note that NHibernate has several features for querying a database to load business objects
NHibernate在查询数据库上有好几种特性
-
How to create your first Fluent NHibernate project
如何创建第一个连贯NHibernate项目
-
The IronRuby / NHibernate combination seems like the most natural candidate .
IronRuby/NHibernate的组合看起来会是最自然的候选方案。
-
NHibernate uses mapping files to guide its translation from the database to business objects and back again .
NHibernate使用映射文件来引导从数据库数据到业务对象的转换。
-
" This is useful in many scenarios where you want better control on what NHibernate is doing " .
“这在很多场景中是很有用的,尤其当你想更好的控制NHibernate的运作的时候”。
-
' Lazy loading'tells NHibernate not to load an object from the database until the application needs to access its data .
'lazyloading'告知NHibernate不要从数据库表中加载这个类对象,直到程序中需要访问这个对象的数据时才加载。
-
NHibernate addresses the well-known problem that object persistence code is a pain in the neck to develop .
NHibernate目的是解决一个众所周知的问题,对象持久代码在开发过程中的瓶颈问题。
-
But the demo app effectively illustrates how NHibernate radically simplifies persistence code .
这个功能大大简化了我们持久化的代码。
-
I hope you come away with the following point : NHibernate will dramatically simplify the persistence layer of your application .
NHibernate将会大大简化你程序中的持久化代码层,我希望你可以带着这个观点离开。
-
If your application is able to complete configuring NHibernate , you will know it had no problems with your mapping documents .
如果你的程序能够完成配置NHibernate,你就应该知道你的映射文件是没有问题的。
-
When an application configures NHibernate , it attempts to compile the mapping documents that it can find .
当一个程序开始配置NHibernate,程序就会尝试去编译所有它能找到的映射文件。
-
Many introductions to NHibernate start with configuration code , but we are going to start at a different place : mapping classes .
许多介绍NHibernate的文章都是以配置文件开始的,但是从另一个地方开始:映射类。
-
It removes the need to create XML mappings and abstracts some complexity out of NHibernate 's infrastructure .
它无需创建XML映射,并简化了NHibernate的一些复杂基础功能。
-
The application creates some business objects , uses NHibernate to persist them , and then reads them back from the database .
这个程序将创建很多个业务对象,来使用NHibernate来对他们进行持久化,然后将他们从数据库中读取出来。
-
The answer is that , since we specified the target class , NHibernate can look up its mapping table in the target class mapping file .
这是因为当我们指定好了目标类的名称之后,NHibernate会通过目标类的XML映射文件来获取其所应的映射表。
-
Mapping is the heart of what NHibernate does , and it presents the greatest stumbling blocks for beginners .
映射是NHibernate的核心,而且配置也给初学者一个很大的绊脚石。
-
Log4Net is not strictly required to use NHibernate , but its automatic logging can be very useful when debugging .
NHibernate不是直接需要Log4Net,可是在调试期间它的自动记录日志功能非常有用。
-
The other dependency which is optional is NHibernate .
其他可选的依赖是NHibernate。
-
We noted above that NHibernate does not require any special interfaces or other code in a class that is to be mapped .
我们在上面就已经说了,Nhibernate不需要特定的接口或是特定的代码写在要映射的类里。
-
Note that the cascade style must be specified in any association mapping , or NHibernate will not cascade saves and deletes .
在所有的关联映射中,cascade必须要指定值,否则NHibernate将不会联机保存或删除。
-
Although the different ways of mapping a class to the database are individually well documented in the NHibernate documentation , the different usage scenarios is not always obvious .
虽然NHibernate文档中已经详细记录了各种类与数据库进行映射的方式,但是它们的使用场景叙述得并不那么明显。
-
What I was looking for was a simple , straightforward tutorial that would get me up to speed on the fundamentals of NHibernate as quickly as possible .
我所需要的就是一个简单直接的教程,能让我尽快对NHibernate熟悉起来。
-
By relieving you of the chore of writing persistence code , NHibernate enables you to keep your focus on your business model , where it belongs .
减轻了你写持久化代码的苦差事,NHibernate能够让你的焦点放在你的业务模型上,这是它属于的地方。
-
So , one need only add a few lines of code to an application and create a simple mapping file for each persistent class , and NHibernate takes care of all database operations .
好了,我们只需要在程序中添加几行代码,和为每一个映射文件创建持久化类,而且NHibernate可以照顾到所有的数据库操作。
-
In this article , I am going to use a very simple demo application ( the demo app ) that does no real work , other than demonstrating data access with NHibernate .
在这篇文章中,我将使用一个简单的示例程序,而不是解说如何使用NHibernate来进行数据访问。
-
The forums application will be designed in such a way that we could switch between different data access technologies such as LINQ to SQL , the Entity Framework , or even NHibernate .
为了创建可测试的应用程序,您就必须以这种方式来构建:应用程序的各个部分是可分离的组件。
-
As we noted above , typing to interfaces , rather than concrete classes , is considered good programming practice , and it doesn 't bind the business model in any way to NHibernate .
像上面说的,需要被定义成接口,而不是具体的类。这种被认为是很好的编程实践。
-
There are non top-level projects but equally important like DynamicProxy ( it 's allows proxying interface and classes and it 's used by several open source projects like NHibernate and Rhino . Mocks ) .
有一些不是顶级的但依然很重要的项目,如DynamicProxy(它允许代理接口和类,被用于好几个开源项目中,如NHibernate和Rhino.Mocks)。