Inserting Parent Child records using NHibernate IDENTITY INSERT OFF

NHibernate Benjamin Perkins

One of the errors I received when I was trying to get the parent child insert to work with NHibernate was: Ein expliziter Wert für die Identitätsspalte kann nicht in der ‘CHILD’-Tabelle eingefügt werden, wenn IDENTITY_INSERT auf OFF festgelegt ist Cannot insert explicit value for identity column in table ‘IdentityTable’ when IDENTITY_INSERT is set to […]

Read More →

How to add double quotes to a string

I needed to save an XML formatted file as a string which required double quotes around the attributes. The below code shows how to add double quotes to a string. string data      = “<customer name=\”Ben Perkins\” class=\”Customer\”>        <property name=\”Id\” /><property name=\”Address\” />        <property name=\”Occupation\” />        <property name=\”Remark\” /></ customer >”; Notice […]

Read More →

Using NuGet to install your ORM into Visual Studio

Visual Studio Benjamin Perkins

I have spent a lot of time Working with NHibernate 3.0 and now am also giving some attention to the Entity Framework. One of the road blocks for using NHibernate is the initial configuration requirements. There are a significant number of actions which must be taken to get NHibernate working, where as, the Entity Framework […]

Read More →