I am using EFExtensions with a typed view in mvc and am getting
The model item passed into the dictionary is of type 'Microsoft.Data.Extensions.Materializer`1+d__0[MvcCms.Web.Models.User]' but this dictionary requires a model item of type 'MvcCms.Web.Models.ViewData.SiteAdminModel'.
'MvcCms.Web.Models.ViewData.SiteAdminModel' contains a definition of User, here is the code in SiteAdminModel
public class SiteAdminModel
{
public StateProvince SelectedState { get; set; }
public IEnumerable<StateProvince> States { get; set; }
public IEnumerable<Organization> Organizations { get; set; }
public IEnumerable<User> Users { get; set; }
}
What would be the best way to fix this. Possibly using a codebehind to cast the Materialized version or doing that in the controller?