public async Task<ActionResult> AuxAdd(KeywordTranslation t)
        {
            var cl = db.Entities
                .FirstOrDefault(c => c.Translations.Any(ct =>
                    ct.LanguageCode == t.LanguageCode &&
                    ct.Value == t.Value &&
                    ct.KeywordId != t.KeywordId)
                );

            if (cl == null)
            {
                cl = new Keyword();
                cl.Translations.Add(t);

                db.Add(cl);
                await db.SaveChangesAsync();
            }

            return Json((await db.Entities
                .OrderBy(ct => ct.Id)
                .ToListAsync())
                .Select(ct => new TranslatedViewModel<Keyword, KeywordTranslation>(ct))
                .Select(ct => new
                {
                    value = ct.Entity.Id.ToString(),
                    text = ct.Translation.Value,
                    selected = ct.Entity.Id == cl.Id
                })
                .ToList());
        }
        public async Task<ActionResult> Create(KeywordTranslation kt)
        {
            if (DoesKeywordExist(kt))
            {
                ModelState.AddModelError("Value", KeywordStrings.Validation_AlreadyExists);
            }

            if (ModelState.IsValid)
            {
                var keyword = new Keyword();
                keyword.Translations.Add(kt);

                db.Add(keyword);
                await db.SaveChangesAsync();

                return RedirectToAction("Index");
            }

            return View(kt);
        }
        public async Task<ActionResult> Edit(Keyword keyword)
        {
            for (var i = 0; i < keyword.Translations.Count; i++)
            {
                var pt = keyword.Translations[i];
                if (DoesKeywordExist(pt))
                {
                    ModelState.AddModelError("Translations[" + i + "].Value",
                        KeywordStrings.Validation_AlreadyExists);
                }
            }

            if (ModelState.IsValid)
            {
                foreach (var t in keyword.Translations)
                {
                    db.UpdateTranslation(t);
                }

                await db.SaveChangesAsync();

                return RedirectToAction("Index");
            }
            return View(keyword);
        }