NHibernate 4.x cookbook over 90 incredible and powerful recipes to help you efficiently use NHibernate in your application

Over 90 incredible and powerful recipes to help you efficiently use NHibernate in your application About This Book Master the full range of NHibernate features through detailed example recipes that you can quickly apply to your own applications Reduce hours of application development time and get a...

Descripción completa

Detalles Bibliográficos
Otros Autores: Liljas, Gunnar, author (author), Zaytsev, Alexander, author, Dentler, Jason, author
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham : Packt 2017.
Edición:Second edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630064906719
Tabla de Contenidos:
  • Cover
  • Copyright
  • Credits
  • About the Authors
  • About the Reviewer
  • www.PacktPub.com
  • Customer Feedback
  • Table of Contents
  • Preface
  • Chapter 1: The Configuration and Schema
  • Introduction
  • Installing NHibernate
  • Configuring NHibernate with hibernate.cfg.xml
  • Configuring NHibernate with App.config or Web.config
  • Configuring NHibernate with code
  • Configuring NHibernate with Fluent NHibernate
  • Configuring NHibernate logging
  • Generating the database
  • Scripting the database
  • Updating the database
  • Using NHibernate schema tool
  • Chapter 2: Models and Mappings
  • Mapping a class with XML
  • Creating class hierarchy mappings
  • Creating class components
  • Mapping a one-to-many relationship
  • Mapping a many-to-many relationship
  • Mapping collections of elements and components
  • Setting up a base entity class
  • Handling versioning and concurrency
  • Mapping by code
  • Mapping by convention
  • Creating mappings fluently
  • Bidirectional one-to-many class relationships
  • Mapping enumerations
  • Immutable entities
  • Mapping relations to non-primary keys
  • Using lazy properties
  • Mapping joins
  • Using calculated properties
  • Using serializable values
  • Dynamic components
  • Mapping &lt
  • subselect&gt
  • Chapter 3: Sessions and Transactions
  • Introduction
  • Setting up session-per-web request
  • Setting up session-per-presenter
  • Creating a session ASP.NET MVC action filter
  • Creating a transaction ASP.NET MVC action filter
  • Save entities to the database
  • Using session.Merge
  • Using session.Refresh
  • Handle concurrency using session.Lock
  • Using dictionaries as entities
  • Using NHibernate with transaction scope
  • Chapter 4: Queries
  • Introduction
  • Query entities by ID
  • Using LINQ to NHibernate
  • Using CriteriaQueries
  • Using QueryOver
  • Using QueryOver projections and aggregates.
  • Using the Hibernate Query Language
  • Using native SQL
  • Eager loading with LINQ
  • Eager loading with Criteria
  • Eager loading with QueryOver
  • Eager loading with HQL
  • Eager loading with SQL
  • Using named queries
  • Using detached queries
  • Using HQL for bulk data changes
  • Filtering collections
  • Using result transformers
  • Extra lazy collections
  • Chapter 5: Improving Performance
  • Reducing application startup time
  • Using MultiCriteria
  • Using MultiQuery
  • Using Futures
  • Eager loading child collections
  • Using stateless sessions
  • Using read-only entities
  • Use the second-level cache
  • Configuring the second-level cache with code
  • Sharding databases for performance
  • Chapter 6: Testing
  • Introduction
  • Using NHibernate Profiler
  • Profiling NHibernate with Glimpse
  • Fast testing with the SQLite in-memory database
  • Preloading data with SQLite
  • Using Fluent NHibernate persistence testing
  • Using the Ghostbusters test
  • Chapter 7: Data Access Layer
  • Introduction
  • Transaction auto-wrapping for the data access layer
  • Setting up an NHibernate repository
  • Using named queries in the data access layer
  • Using ICriteria in the data access layer
  • Using paged queries in the data access layer
  • Using LINQ specifications in the data access layer
  • Chapter 8: Extending NHibernate
  • Introduction
  • Creating an encrypted string type
  • Creating a money type
  • Using well-known instance types
  • Using dependency injection with entities
  • Creating an audit-event listener
  • Creation and change stamping of entities
  • Generating trigger-based auditing
  • Implementing a soft-delete pattern
  • Setting Microsoft SQL's Context_Info
  • Using dynamic connection strings
  • Using custom dialect functions
  • Using custom functions in LINQ
  • Extending the LINQ provider
  • Chapter 9: NHibernate Contribution Projects.
  • Introduction
  • Property validation with attributes
  • Creating validator classes
  • Setting up full-text searches
  • Auditing data with Envers
  • Using NHibernate Spatial
  • Index.