Beispiel #1
0
        public async Task <IActionResult> PutExpediente(int id, Expediente expediente)
        {
            if (id != expediente.Id)
            {
                return(BadRequest());
            }

            _context.Entry(expediente).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ExpedienteExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Beispiel #2
0
        public async Task <IActionResult> PutRegistroponto(int id, Registroponto registroponto)
        {
            if (id != registroponto.Idregistroponto)
            {
                return(BadRequest());
            }

            _context.Entry(registroponto).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!RegistropontoExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }