public ActionResult Create(Word word)
        {
            try
            {
                _wordRepo.AddWord(word);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
Beispiel #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="word"></param>
        /// <returns>Number of records added</returns>
        public int AddWord(Word word)
        {
            _context.Words.Add(word);

            return _context.SaveChanges();
        }