public async Task Update(int id, PagoUpdateDto model) { var entry = await _context.Pagos.SingleAsync(x => x.PagoId == id); entry.TarjetaId = model.TarjetaId; entry.TutoriaId = model.TutoriaId; entry.Descripcion = model.Descripcion; entry.CvcTarjeta = model.CvcTarjeta; await _context.SaveChangesAsync(); }
public async Task <ActionResult> Update(int id, PagoUpdateDto model) { if (_PagoService.Existencia(id) == true) { await _PagoService.Update(id, model); return(NoContent()); } else { return(NotFound()); } }