public async Task Update(int id, InformeUpdateDto model) { var entry = await _context.Informes.SingleAsync(x => x.InformeId == id); entry.TutoriaId = model.TutoriaId; entry.Descripcion = model.Descripcion; entry.Fecha = model.Fecha; await _context.SaveChangesAsync(); }
public async Task <ActionResult> Update(int id, InformeUpdateDto model) { if (_InformeService.Existencia(id) == true) { await _InformeService.Update(id, model); return(NoContent()); } else { return(NotFound()); } }