Brosteins

Developers, Technology Evangelists, Bros.

Tag: nhibernate

NHibernate Map by Code Examples – Part 2

This post is the second post in a multi-part series of examples for NHibernate‘s Map by Code feature.  Code in this series has been tested with NHibernate’s latest 4.0 as well as 3.3.3. Part One Many To Many Inverse Bag Part Two (you are here) JoinedSubClassMapping vs SubclassMapping (Discriminators) vs UnionSubclassMapping Part Three ForeignKey “none” IdBag Formula EnumStringType<> JoinedSubClassMapping vs…

Share

Why To Use the Repository Pattern

I felt it was time to update and clarify some previous thoughts on the use of the Repository pattern. Previously, I had indicated that a Repository did not provide much benefit, as ORMs act as a Repository. Although true, I had a very specific context in mind when saying this – anemic domain models. When you’re working with anemic domain…

Share

Why Not to Use the Repository Pattern

The Repository pattern, as described by Edward Hieatt and Rob Mee in Martin Fowler’s Patterns of Enterprise Application Architecture, is a layer of abstraction that is used to mediate interactions between the domain and the data mapping (ORM) layers. You can use a repository to minimize the duplicate query logic that a can arise in larger domains. Often times, I…

Share

SQL Server Database Encryption with NHibernate Series – Part 4 of 5

This is the fourth post in my SQL Server Database Encryption with NHibernate Series. Check out the others posts here: Part 1 of 5: Summary Part 2 of 5: Create a database certificate and symmetric key for encryption Part 3 of 5: Configure domain and NHibernate mappings to decrypt and read an encrypted value Part 4 of 5: Configure domain and NHibernate mappings…

Share

SQL Server Database Encryption with NHibernate Series – Part 3 of 5

This is the third post in my SQL Server Database Encryption with NHibernate Series. Check out the others posts here: Part 1 of 5: Summary Part 2 of 5: Create a database certificate and symmetric key for encryption Part 3 of 5: Configure domain and NHibernate mappings to decrypt and read an encrypted value Part 4 of 5: Configure domain and NHibernate mappings…

Share

SQL Server Database Encryption with NHibernate Series – Part 2 of 5

This is the second post in my SQL Server Database Encryption with NHibernate Series. Check out the others posts here: Part 1 of 5: Summary Part 2 of 5: Create a database certificate and symmetric key for encryption Part 3 of 5: Configure domain and NHibernate mappings to decrypt and read an encrypted value Part 4 of 5: Configure domain and NHibernate mappings…

Share

SQL Server Database Encryption with NHibernate Series – Part 1 of 5

In this series of posts, I am going to describe one way to leverage SQL Server’s built-in database encryption with NHibernate. The posts will include include: Part 1 of 5: Summary Part 2 of 5: Create a database certificate and symmetric key for encryption Part 3 of 5: Configure domain and NHibernate mappings to decrypt and read an encrypted value Part 4…

Share