Server Error in '/' Application.
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[MyApplication.Models.Location]', but this dictionary requires a model item of type 'MyApplication.Models.Location'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Controller
LocationDb dbLocation = new LocationDb();
dbLocation.GetAllLocation().ToList();
Model
public class Location
{
public Location()
{
this.Locations=New List<Location>();
}
public List<Location> Locations{get;set;}
public string Id{get;set;}
public string Description{get;set;}
}
View
@model MyApplication.Models.Location
Thanks