public ActionResult Edit(Stringing stringing) { if (ModelState.IsValid) { db.Entry(stringing).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(stringing); }
public ActionResult Create(Stringing stringing) { if (ModelState.IsValid) { db.Stringings.Add(stringing); db.SaveChanges(); return RedirectToAction("Index"); } return View(stringing); }
public static void Apply(Stringing f, int param1, double param2) { Console.WriteLine(f(param1, param2)); }
public SaveResult UpdateStringing(Stringing stringing) { SaveResult result = new SaveResult { WasSuccessful = true }; db.Stringings.Attach(stringing); db.ObjectStateManager.ChangeObjectState(stringing, System.Data.EntityState.Modified); if (!SaveChanges()) { result.WasSuccessful = false; result.Message = "Error updating Stringing"; } return result; }
public SaveResult DeleteStringing(Stringing stringing) { SaveResult result = new SaveResult { WasSuccessful = true }; db.Stringings.DeleteObject(stringing); if (!SaveChanges()) { result.WasSuccessful = false; result.Message = "Error deleting Stringing"; } return result; }
public Stringing CreateStringing(Stringing stringing) { db.Stringings.AddObject(stringing); SaveChanges(); return stringing; }