地图类
public class cAdministratorMap : ClassMap<cAdministrator>
{
public cAdministratorMap()
{
Table("Administrators");
CompositeId<cAdministratorsKey>(c => c.Key)
.KeyProperty(x => x.Client_id, "client_id")
.KeyProperty(x => x.Start_date, kp => kp.ColumnName("start_date").Type(DbType.Date.ToString()))
.KeyProperty(x => x.Adm_type, kp => kp.ColumnName("adm_type").Type(DbType.AnsiString.ToString()));
Map(x => x.Person_id, "person_id").Not.Insert().Not.Update();
Map(x => x.end_date).Column("end_date");
Map(x => x.description).Column("description").Length(200);
References(x => x.Person).Column("person_id");
References(x => x.Cliente).Column("client_id");
}
}
我遇到了以下错误:
请帮忙解决。这个 SqlParameterCollection 的计数为 6,但是索引 6 无效。