NHibernate 3 Beginner's Guide
Dr. Gabriel Nicolas Schenker, Aaron Cure
- 出版商: Packt Publishing
- 出版日期: 2011-08-20
- 售價: $1,840
- 貴賓價: 9.5 折 $1,748
- 語言: 英文
- 頁數: 368
- 裝訂: Paperback
- ISBN: 1849516022
- ISBN-13: 9781849516020
-
相關分類:
Java 相關技術
已絕版
相關主題
商品描述
Rapidly retrieve data from your database into .NET objects
- Incorporate robust, efficient data access into your .Net projects
- Reduce hours of application development time and get better application architecture and performance
- Create your domain model first and then derive the database structure automatically from the model
- Test, profile, and monitor data access to tune the performance and make your applications fly
- Clear, precise step-by-step directions to get you up and running quickly
In Detail
Ideally, we would want to persist the objects our application uses and produces AS IS, without having to first transform them in complex ways. NHibernate is a framework that provides us with an object-oriented access to a relational database without having to write SQL and with little or no database-specific data access code. Definitely, if you are a .NET developer, knowing more about NHibernate will simplify and reduce your efforts in developing .Net applications.NHibernate 3 Beginner's Guide introduces Nhibernate with step-by-step examples, and is the easiest way to learn about bridging the gap between object-oriented .NET applications and the relational database that stores the application's data. It is a beginner's guide to NHibernate that starts from scratch. Successive chapters build upon earlier concepts, while the sample code presents various ways to accomplish typical data access tasks.
NHibernate 3 Beginner's Guide examines all of the topics required to get a functional data access layer implemented while writing the least amount of code possible, presenting options along the way to handle particular edge cases or situations as they arise. The book begins with an introduction to NHIbernate 3 and then moves on to creating the development environment. Then it teaches you how to create a model, define a database schema, and map the model to the database then covers sessions and transactions. This is succeeded by testing, profiling, and configuration, validation of data and writing queries. Finally, we wrap up with notes on the common pitfalls that you should avoid.
Once you complete reading the book, you will have gained the skills and knowledge to incorporate NHibernate into your own applications.
An easy-to-follow guide that will show you how to connect the NHibernate object-relational mapper to your projects to create a rich, efficient, object-oriented data access layer with little or no additional work
What you will learn from this book
- Create a domain model
- Learn different techniques to map the domain model to the underlying database
- Build the database from your model automatically
- Use session and transactions to persist and retrieve data
- Efficiently query the database by using LINQ to NHibernate and HQL
- Configure your system for use of NHibernate in a clear and concise way
- Write unit and integration tests for your data access layer
- Learn about the common pitfalls that should be avoided
- Implement data validation on the entity level
- Monitor and profile your data access
Approach
This is a beginner's guide with comprehensive step-by-step instructions. There are appropriate screenshots throughout the book and plenty of code, which is explained in a well-thought-out format.
Who this book is written for
If you are a new or seasoned developer of .NET web or desktop applications who is looking for a better way to access database data, then this book is for you. It is a basic introduction to NHibernate, with enough information to get a solid foundation in using NHibernate. Some advanced concepts are presented where appropriate to enhance functionality or in situations where they are commonly used. Absolutely no knowledge of NHibernate is required to read this book.
商品描述(中文翻譯)
快速從資料庫中擷取資料到.NET物件
- 將強大且高效的資料存取整合到您的.NET專案中
- 減少應用程式開發時間,提升應用程式架構和效能
- 先建立您的領域模型,然後從模型自動導出資料庫結構
- 測試、分析和監控資料存取以調整效能,讓您的應用程式更加順暢
- 提供清晰、精確的逐步指南,讓您快速上手
詳細內容:
理想情況下,我們希望能夠直接將應用程式使用和產生的物件持久化,而不需要進行複雜的轉換。NHibernate是一個框架,提供了對關聯式資料庫的物件導向存取,而不需要撰寫SQL,並且只需很少或不需要特定於資料庫的資料存取程式碼。如果您是.NET開發人員,了解更多關於NHibernate的知識將簡化和減少您在開發.NET應用程式時的努力。《NHibernate 3初學者指南》通過逐步示例介紹了NHibernate,是學習如何橋接面向物件的.NET應用程式和存儲應用程式資料的關聯式資料庫的最簡單方法。這是一本從零開始的NHibernate初學者指南。後續章節建立在前面的概念之上,而示例代碼則呈現了完成典型資料存取任務的各種方法。
《NHibernate 3初學者指南》探討了實現功能性資料存取層所需的所有主題,同時以最少的程式碼撰寫方式呈現選項,以處理特定的邊緣情況或情境。本書首先介紹了NHibernate 3,然後介紹了如何建立開發環境。然後教您如何建立模型,定義資料庫結構,並將模型映射到資料庫,然後涵蓋了會話和交易。接著是測試、分析和配置,資料驗證和撰寫查詢。最後,我們提供了一些應避免的常見問題。
閱讀完本書後,您將獲得將NHibernate整合到自己應用程式中的技能和知識。
這本書是一本易於遵循的指南,將向您展示如何將NHibernate物件關聯映射器連接到您的專案中,以便輕鬆或幾乎不需要額外工作地創建豐富、高效的面向物件的資料存取層。
本書適合新手或經驗豐富的.NET網頁或桌面應用程式開發人員,他們正在尋找更好的方式來存取資料庫資料。這是一本關於NHibernate的基礎介紹,提供足夠的資訊以建立使用NHibernate的堅實基礎。在適當的情況下,將介紹一些高級概念以增強功能或在常見情況下使用。閱讀本書不需要任何NHibernate的知識。