Reputation: 9895
The project name is MVCMultipleModelTypes
@using MVCMultipleModelTypes.Models
@model Empl...beeeeeeeeepp.....
Does anyone know why i can't access the Models in the View? I loaded the project in Visual Studio 2015 and 2013 and same thing. The other projects work fine.
The pictre should tell the whole story.
Upvotes: 1
Views: 2256
Reputation: 23680
Your class needs to be defined as public for you to access it in the view.
public class Employee
{
public string EmployeeName { get; set; }
}
Upvotes: 2