public ActionResult DeleteConfirmed(int id) { SightingShot sightingshot = db.SightingShots.Find(id); db.SightingShots.Remove(sightingshot); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /SightingShots/Delete/5 public ActionResult Delete(int id = 0) { SightingShot sightingshot = db.SightingShots.Find(id); if (sightingshot == null) { return(HttpNotFound()); } return(View(sightingshot)); }
public ActionResult Edit(SightingShot sightingshot) { if (ModelState.IsValid) { db.Entry(sightingshot).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sightingshot)); }
public ActionResult Create(SightingShot sightingshot) { if (ModelState.IsValid) { db.SightingShots.Add(sightingshot); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sightingshot)); }
public static void BroadcastSighterConversionUpdateToClients(SightingShot sighter) { GetClients().All.SighterConversionUpdate(sighter.Id, sighter.Converted); }