Hello friends, I appeal to you to solve the following question
I have two entities named MtoProcedimientos and MtoZonas
Mtoprocedures has the following relationship
public int MtoProcedimientoId { get; set; }
public virtual ICollection<MtoZona> mtoZonas { get; set; }
and in the entity mtozonas has the relationship
public int MtoProcedimientoId { get; set; }
public virtual MtoProcedimiento mtoProcedimiento { get; set; }
now when I make a query as follows.
// GET: Procedimientos/Details/5
public ActionResult Details(int? id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
var mtoProcedimiento = db.MtoProcedimientos.Find(id);
if (mtoProcedimiento == null)
{
return HttpNotFound();
}
return View(mtoProcedimiento);
}
What I want is to obtain the information of the 2 entities, to make a summary; but although there are records in the table of regions that meet the conditions, I do not obtain any record.
believe they can help me, thank you in advance