开发者

How to make ProfileCommon play nice with MVC

I am converting a webforms site to MVC-3 and am trying to pass my UserProfileModel to a view. However; I am deriving my UserProfileModel class from my custom provider

public class UserProfileModel:DFW.Providers.ProfileCommon
{
    public UserProfileModel(stri开发者_高级运维ng userName,bool IsAuthenticated)
    {
        this.Initialize(userName, IsAuthenticated);

    }

Here is the issue, ProfileCommon is not Enumerable therefore I can't do a

@foreach (var item in Model) {
}

What is a simple way to make this play nicely with MVC?


There isn't, the provider model is not great and does not support constructor injection.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜