EntitySet System.InvalidOperationException - “the entity type is not part of the model for the current context”
问题 Similar Questions The entity type <classname> is not part of the model for the current context -and- EF 4.1 Code First error - The entity type SomeType is not part of the model for the current context are similar questions but they are "code first" perspective only, with much simpler data models, and address connection string and mapping issues. Please look closely at this one. Symptom // HomeController.cs public ActionResult Index() { var _db = new MealsContext(); var m = _db.Meals.ToList();