public ActionResult Update([Bind(Exclude = "Songs")] myType myType) { if (ModelState.IsValid) { db.Entry(myType).State = EntityState.Modified; db.SaveChanges(); } return(Json(myType, JsonRequestBehavior.AllowGet)); }
public ActionResult Create([Bind(Exclude = "myTypeId,Songs")] myType myType) { if (ModelState.IsValid) { db.myTypes.Add(myType); db.SaveChanges(); } return(Json(myType, JsonRequestBehavior.AllowGet)); }