At the heart of it, concurrency control is about working out which of the two concurrent database operations win. NHibernate's concurrency control goes beyond that and offers prevention against mistakenly updating stale data. This mostly applies to update operations. Select, insert, and delete operations can happen concurrently without any problem. Before we look into this feature, let's take a moment to understand what kind of problems we can face in absence of concurrency control for update operations. Let's assume that our employee benefits management system has a feature where in HR staff can update personal details of the employees. In a rare situation, it may happen that two HR staff members open the personal details of the same employee and try to update two different fields on their profile. Let's say that the first staff member updates the employee's last name, whereas the second staff member updates the employee's mobile number. Following is the sequence of...
Learning NHibernate 4
Learning NHibernate 4
Overview of this book
Table of Contents (18 chapters)
Learning NHibernate 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Introduction to NHibernate
Let's Build a Simple Application
Let's Tell NHibernate About Our Database
NHibernate Warm-up
Let's Store Some Data into the Database
Let's Retrieve Some Data from the Database
Optimizing the Data Access Layer
Using NHibernate in a Real-world Application
Advanced Data Access Patterns
Working with Legacy Database
A Whirlwind Tour of Other NHibernate Features
Index
Customer Reviews