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.
精彩评论