public async Task <ActionResult> DeleteConfirmed(int id)
        {
            WordsPopularityWithCognates2 wordsPopularityWithCognates2 = await db.WordsPopularityWithCognates2.FindAsync(id);

            db.WordsPopularityWithCognates2.Remove(wordsPopularityWithCognates2);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "WordId,Text,FirstTranslationVariant,SecondTranslationVariant,ThirdTranslationVariant,Quantity,Differance")] WordsPopularityWithCognates2 wordsPopularityWithCognates2)
        {
            if (ModelState.IsValid)
            {
                db.Entry(wordsPopularityWithCognates2).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(wordsPopularityWithCognates2));
        }
        // GET: WordsPopularityWithCognates2/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WordsPopularityWithCognates2 wordsPopularityWithCognates2 = await db.WordsPopularityWithCognates2.FindAsync(id);

            if (wordsPopularityWithCognates2 == null)
            {
                return(HttpNotFound());
            }
            return(View(wordsPopularityWithCognates2));
        }
        // GET: WordsPopularityWithCognates2/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            System.Data.SqlClient.SqlParameter param  = new System.Data.SqlClient.SqlParameter("@wordId", id);
            System.Data.SqlClient.SqlParameter param1 = new System.Data.SqlClient.SqlParameter("@wordId", id);
            System.Data.SqlClient.SqlParameter param2 = new System.Data.SqlClient.SqlParameter("@wordId", id);
            var derivedWordsChainWithContext          = db.Database.SqlQuery <DerivedWordChainCellWithContext>("GetChainOfDerivedWordsWithContext @wordId", param);

            var basicWordsChainWithContext = db.Database.SqlQuery <DerivedWordChainCellWithContext>("GetChainOfBasicWordsWithContext @wordId", param1);

            var sentances = db.Database.SqlQuery <Sentence>("GetSentencesWithWord @wordId", param2);

            WordsPopularityWithCognates2 wordsPopularityWithCognates2 = db.WordsPopularityWithCognates2.Find(id);

            ViewBag.WordsPopularityWithCognates = wordsPopularityWithCognates2;
            ViewBag.SentencesWithWord           = sentances.ToList();
            ViewBag.Id = id;
            //my comment in hotfix

            return(View("DerivedWordsChainWithContextDetails", basicWordsChainWithContext.Union(derivedWordsChainWithContext).ToList()));
        }