NHiberante Error Invalid index 1 for this SqlParameterCollection with Count 1

Invalid index 1 for this SqlParameterCollection with Count=1

If you ever get this error it could be because your property mappings are mapped to the same column.

<property name="FirstName" column="FirstName" type="string" not-null="true" />
<property name="LastName" column="FirstName" type="string" not-null="true" />

This will cause this error, the fix is to map your properties correctly.

<property name="FirstName" column="FirstName" type="string" not-null="true" />
<property name="LastName" column="LastName" type="string" not-null="true" />

0 Responses to “NHiberante Error Invalid index 1 for this SqlParameterCollection with Count 1”


  • No Comments

Leave a Reply