NHibernate ERROR Message Invalid index 4 for this SqlParameterCollection with Count=4.
My Mapping:
public KazangAccountClassMap()
{
Table("KazangAccount");
Id(x => x.Id).GeneratedBy.Identity();
Map(x => x.Channel).Not.Nullable();
Map(x => x.UserName).Not.Nullable();
Map(x => x.Password).Not.Nullable();
HasMany<KazangMerchant>(x => x.KazangMerchants)
.KeyColumn("AccountId")
.Inverse();
}
CONTROLLER:
public ActionResult SaveChannelProperty(string NewProp, string ChannelName)
{
client.CreateKazangChannelAttribute(new KazangChannelAttr
{
KazangChannelId = ChannelObject.Id,
AttrName = NewProp,
AttrValue = NewProp,
AttrType = ""
});
}