public async Task <IActionResult> PutMercadoPagoDatos(long id, MercadoPagoDatos mercadoPagoDatos) { if (id != mercadoPagoDatos.Id) { return(BadRequest()); } _context.Entry(mercadoPagoDatos).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MercadoPagoDatosExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <MercadoPagoDatos> > PostMercadoPagoDatos(MercadoPagoDatos mercadoPagoDatos) { _context.MercadoPagoDatos.Add(mercadoPagoDatos); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMercadoPagoDatos", new { id = mercadoPagoDatos.Id }, mercadoPagoDatos)); }