public async Task <IActionResult> Edit(int id, [Bind("Id,Words,解释,WordsReverse,押韵,押韵字使用频率")] 汉字38万词海 汉字38万词海) { if (id != 汉字38万词海.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(汉字38万词海); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!汉字38万词海Exists(汉字38万词海.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(汉字38万词海)); }
public async Task <IActionResult> Create([Bind("Id,Words,解释,WordsReverse,押韵,押韵字使用频率")] 汉字38万词海 汉字38万词海) { if (ModelState.IsValid) { _context.Add(汉字38万词海); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(汉字38万词海)); }