我在我的視圖模型中有一些內部的自動屬性,但我的強類型視圖沒有看到它們。一切都在同一個組件中,爲什麼會發生這種情況? public class MyViewModel {
public int PublicProperty { get; set; }
internal int InternalProperty { get; set; }
}
。 @*My view*@
@
在我的ASP.NET MVC 3項目中,我有一個對我的DomainModel項目的引用。 當我嘗試創建強類型視圖時,會出現此問題。在模型類列表中,我的DomainModel模型不存在。 ,我做了嘗試,但沒有成功(從另一個線程)以下: -remove reference to the library containing the model
-clean project
-close VS
-
我是新來的MVC,所以也許這是一個愚蠢的問題 - 我試圖讓我的頭在asp中的強類型視圖。網絡mvc。我正在處理第3版。 如果我有一個包含2個模型的項目 - 比如Person和Department。一個人必須屬於一個部門。所以,我有我的系車型(和我產生我的控制器和CRUD接口): public class Department
{
public int Id { get; set;}