public async Task <IActionResult> Create([Bind("ID,WordText,Translation,Description")] Word word) { if (ModelState.IsValid) { _context.Add(word); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(word)); }
public async Task <IActionResult> Create([Bind("ID,ExampleText,ExampleTranslation,WordID")] Example example) { if (ModelState.IsValid) { _context.Add(example); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(example)); }