Skip to main content

NHibernate

Store Guid as BINARY(16) in MySQL with NHibernate

Why use BINARY type to store a GUID ?

GUID is a 128-bit (16 bytes) integer number. 

In its canonical textual representation, GUID are represented as 32 hexadecimal digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens).

For example: 79d266c1-ca54-4bc9-9b0e-4a988fa1b1dc

Setting a base entity class to use with your favorite ORM
Source code of a base entity class to use with your favorite ORM like NHibernate or Entity Framework
Handle MySQL data types with NHibernate mapping by code
Some extension methods to handle MySQL data types with NHibernate mapping by code
Improve NHibernate QueryOver with Restrictions and ICriterion
You will discover one of the techniques to centralize and produce more comprehensive code around NHibernate QueryOver.
Improve NHibernate QueryOver with extension methods
You will discover one of the techniques to centralize and produce more comprehensive code around NHibernate QueryOver.
Subscribe to NHibernate