I use asp.net mvc5 with EF, in this few string i received "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection". What's wrong?
public JsonResult GetResponibleParty()
{
List<CI_ResponsibleParty> resParty;
using (MetabaseDbContext context = new MetabaseDbContext())
{
resParty = context.SetOfResponsibleParty.ToList();
return Json(resParty, JsonRequestBehavior.AllowGet);
}
}