Hi ramco1917,
You have set Models.Location as model class for the View but from Controller you are passing List<Location> as model.
So you need to pass the single Location as model by setting the Locations property which accepts List<Location> as property.
Use below code.
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; }
}
Controller
LocationDb dbLocation = new LocationDb();
Location location = new Location();
location.Locations = dbLocation.GetAllLocation().ToList();
return View(location);
View
@model MyApplication.Models.Location