2013-07-17 16 views
0

我有一個全新的EPi7 mvc4(Razor)解決方案。當我嘗試添加一個簡單的頁面類型時,數據庫沒有得到更新。並且沒有頁面類型可用EPiServer7 PageTypes沒有得到更新

頁類型如下:

[ContentType(DisplayName = "TestPage", GUID = "00e90ef5-cc85-487c-9aed-c28e6046cb2b", Description = "")] 
public class TestPage : PageData 
{ 
    [CultureSpecific] 
    [Editable(true)] 
    [Display(
     Name = "Main body", 
     Description = "The main body will be shown in the main content area of the page, using the XHTML-editor you can insert for example text, images and tables.", 
     GroupName = SystemTabNames.Content, 
     Order = 1)] 
    public virtual XhtmlString MainBody { get; set; } 
} 

在以前的版本中,關閉同步可以有像一些類型的交換機?我意識到這不再是一個PageTypeBulder,但仍然是。

回答

0

我找到了解決辦法。這個問題導致它出現在命名不好的web項目(xxx.Web.Mvc)中。當我刪除'.Mvc'部分時,它開始工作。這很奇怪。我不知道命名會破壞Epi7。

1

是的,有一個選項可以像以前版本的EPiServer一樣關閉同步。

您可以通過enableModelSyncCommit站點設置元素episerver.config設置爲false禁用提交階段。

如果有很多開發人員共享 數據庫的工作,你要避免新添加的屬性從另一塊的代碼刪除 這可能是有用的。

你可以閱讀更多關於博客關於synchronization of typed models