Of course, data access involves transaction management. For NHibernate, we usually use the following method. //Create a new company var session = Assyria.DataAccess.SessionFactory.GetCurrentSession(); using (NHibernate.ITransaction transaction = session.BeginTransaction()) { session.Save(company); transaction.Commit(); } The session’s BeginTransaction is used to start transaction management, and the Commit method is used to explicitly commit the transaction. Spring.NET provides complete […]
Tag: nhibernate
Spring.NET 1.3.2 integrates NHibernate 3.2 – 4 – to implement basic data access
A week has passed in the blink of an eye, and I haven’t actually accessed the database yet, so I need to work harder. Tall buildings rise from the ground, and we start step by step. 1. Prepare data Data access naturally requires data. Here we use the sample database in the book “Microsoft SQL […]
NHibernate of ORM framework
What is NHibernate NHibernate is an open source object-relational mapping (ORM) framework that allows developers to use an object-oriented approach to access relational databases. It is the C# version of the Hibernate framework, an ORM framework on the Java platform. Using NHibernate, you can map .NET objects to database tables and use an object-oriented way […]