Esempio n. 1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            PotentialCognate potentialCognate = await db.PotentialCognates.FindAsync(id);

            db.PotentialCognates.Remove(potentialCognate);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        // 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));
        }