Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning NHibernate 4

You're reading from   Learning NHibernate 4 Explore the full potential of NHibernate to build robust data access code

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher Packt
ISBN-13 9781784393564
Length 402 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Suhas H Chatekar Suhas H Chatekar
Author Profile Icon Suhas H Chatekar
Suhas H Chatekar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction to NHibernate FREE CHAPTER 2. Let's Build a Simple Application 3. Let's Tell NHibernate About Our Database 4. NHibernate Warm-up 5. Let's Store Some Data into the Database 6. Let's Retrieve Some Data from the Database 7. Optimizing the Data Access Layer 8. Using NHibernate in a Real-world Application 9. Advanced Data Access Patterns 10. Working with Legacy Database 11. A Whirlwind Tour of Other NHibernate Features Index

Mapping components


So far we have been using the term entity to refer to classes that NHibernate is able to persist to database. But when it comes to NHibernate, there is more to that term. An entity is something that has its own identifier and can be distinguished from another instance of same type by using the identifier value. An important feature of entity is that NHibernate is able to track the entity. This means that NHibernate knows whether the entity is only present in memory but is not persisted to database, or is persisted to database but the instance in the memory is updated, and so on (sometimes this is also called dirty tracking). Another important feature of entities is that they are saved in their own database table. The way NHibernate handles the entities gives them an identity of their own. This enables the entities to be fetched from database, navigate from one entity to other entity, and so on, using entity identifiers.

Not every class in the domain model needs to be an...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image