public async Task <ActionResult> DeleteConfirmed(int id) { PotentialCognate potentialCognate = await db.PotentialCognates.FindAsync(id); db.PotentialCognates.Remove(potentialCognate); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "BasicWordId,DerivedWordId,BasicWordText,DerivedWordText,BasicWordFirstTranslationVariant,DerivedWordFirstTranslationVariant")] PotentialCognate potentialCognate) { if (ModelState.IsValid) { db.Entry(potentialCognate).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(potentialCognate)); }
// GET: PotentialCognates/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PotentialCognate potentialCognate = await db.PotentialCognates.FindAsync(id); if (potentialCognate == null) { return(HttpNotFound()); } return(View(potentialCognate)); }