Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> UpdatePut(WordEditModel model)
        {
            await _wordService.Update(model);

            return(RedirectToAction("GetAll"));
        }