當我嘗試在我的模型類映射到一個char數據類型的專欄中,我得到一個錯誤:實體框架代碼優先有效的基元屬性是什麼?
The property '[ColumnName]' is not a declared property on type '[ClassName]'. Verify that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation. Make sure that it is a valid primitive property.
什麼是有效的基本類型爲EF代碼第一次?
嘿嘿「什麼是EF Code First的有效基元類型?」 – X181
提示:如果你有一個私人設置的屬性,也會發生錯誤。在我的情況下,該物業是在一個基地班。 – X181