public async Task Update(WordEditModel model) { var word = await _context.Words.FirstOrDefaultAsync(x => x.Id == model.Id); _mapper.Map(model, word); await _context.UpdateAsync(word); }
public async Task <IActionResult> UpdatePut(WordEditModel model) { await _wordService.Update(model); return(RedirectToAction("GetAll")); }