public ActionResult PlaceEditPartial(int kiosqueID) { Kiosque kiosque = db.Kiosques.Include("places").Where(k => k.Id == kiosqueID).First(); Plan plan = db.Plans.Include("kiosques.places").Where(p => p.Id == kiosque.Id).First(); PlanVM vm = new PlanVM() { Plan = plan, Kiosque = kiosque }; return PartialView(vm); }
public ActionResult PlanPartial(int Planid) { PlanVM vm = new PlanVM() { Plan = db.Plans.Include("Kiosques.Places").Where(p => p.Id == Planid).FirstOrDefault() }; return PartialView(vm); }