예제 #1
0
        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();
        }
예제 #2
0
        public async Task <ActionResult> Update(int id, PagoUpdateDto model)
        {
            if (_PagoService.Existencia(id) == true)
            {
                await _PagoService.Update(id, model);

                return(NoContent());
            }
            else
            {
                return(NotFound());
            }
        }