public ActionResult Edit(PressCenter pc) { pc._id = ObjectId.Parse(Request.Form["_id"]); //omc.HomenTextHt.UpdateOne(new ObjectFilterDefinition<HomeText>(new { _id = ht._id }) // , new JsonUpdateDefinition<HomeText>("{$set:{Title:\"" + ht.Title + "\"}}")); omc.UpdateOneById <PressCenter>(pc); return(RedirectToAction("Edit", new { PressCenter_id = pc._id })); }
public ActionResult Add(PressCenter pc) { omc.InsertOne(pc); return(View()); }