0
在項目中,我有這樣的映射:Fluent映射失敗,出現「Could not determine type ...」異常。
public virtual string LicensePlate { get; set; }
public VehicleMap()
{
Table("VEHICLE");
Id(x => x.LicensePlate, "LICENSE_PLATE");
...
}
當我嘗試運行中產生MappingException的應用程序,並指定:
Could not determine type for: nononono.Vehicle, nononono.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, for columns: NHibernate.Mapping.Column(LICENSE_PLATE)
有人能指出我在哪裏,我做錯了?
我試過將Id
設置爲.NotNullable
,.GeneratedBy.Assigned()
並沒有任何幫助。
您可以更改ID到別的東西?我懷疑這個錯誤是其他的,除了這個會顯示 – Firo 2013-02-18 19:15:07
你能發佈你的'Vehicle.cs'文件嗎? – rae1 2013-02-19 05:01:50
謝謝@ rae1n,錯誤出現在'Vehicle.cs'文件中。 – graffitiMSX 2013-02-19 13:01:05