I create a class to hold view data for two different types from my model.
class FooBarViewData
{
public List<Foo> Foos { get; set; }
public List<Bar> Bars { get; set; }
}
I typed my view to a FooBarViewData but it fails to find the type.
<%@ Page Title=""
Language="C#"
MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<FooBarViewData>" %>
How can I get this to work. Also once it does work, how do I access Foo and Bar, by a key on the ViewData collection or another way?