[HttpGet] public JsonResult Create(int id){ var order = context.OrderHeader.Include(d => d.OrderDetail).Where(i => i.id == id).ToList(); return Json(order); //1.) Problem will have circular dependency } [HttpPost] public ActionResult Create(OrderHeader order){ //2.) how to insert or update OrderDetail here? How will i know if i trigger udpate/delete or create? }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)