2011-03-24 30 views
0

我正在將webforms網站轉換爲MVC-3,並試圖將我的UserProfileModel傳遞給視圖。然而;我從我的自定義提供如何使ProfileCommon與MVC很好玩

public class UserProfileModel:DFW.Providers.ProfileCommon 
{ 
    public UserProfileModel(string userName,bool IsAuthenticated) 
    { 
     this.Initialize(userName, IsAuthenticated); 

    } 

這裏獲得我的UserProfileModel類是問題,是的ProfileCommon不可枚舉因此我不能做一個

@foreach (var item in Model) { 
} 

什麼是一個簡單的方法,使這個戲很好與MVC?

回答

0

沒有,提供者模型不是很好,不支持構造器注入。

相關問題