Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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 (18) Chapters Close

Learning NHibernate 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
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

Fluent mapping a.k.a. Fluent NHibernate


If you have liked mapping by code and are excited about being able to declare mappings programmatically, then I am sure you would fall in love with fluent mappings offered by Fluent NHibernate (FNH). As far as I can tell, fluent mapping is the most widely used technique of mapping in NHibernate world and we will see why everyone likes it so much.

FNH scans your code based on mappings, processes them, and comes up with appropriate XML mappings. All this process is transparent to you as developer. But it is useful to remember that all FNH is doing is transforming code-based mappings into XML mappings.

Before we start writing fluent mappings for our classes, let me tell you that FNH, for some reasons, chose to name their APIs differently than their XML or mapping by code counterparts. For example, property mapping in FNH is named Map. This could be a cause of confusion if you are new to FNH but I'm sure your love for FNH would outweigh the confusion and...

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 £13.99/month. Cancel anytime
Visually different images