public async Task<IActionResult> PutAuditCountryPlatform(int id, AuditCountryPlatform auditCountryPlatform) { if (id != auditCountryPlatform.AuditCountryPlatformId) { return BadRequest(); } _context.Entry(auditCountryPlatform).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AuditCountryPlatformExists(id)) { return NotFound(); } else { throw; } } return NoContent(); }
public async Task<ActionResult<AuditCountryPlatform>> PostAuditCountryPlatform(AuditCountryPlatform auditCountryPlatform) { _context.AuditCountryPlatform.Add(auditCountryPlatform); await _context.SaveChangesAsync(); return CreatedAtAction("GetAuditCountryPlatform", new { id = auditCountryPlatform.AuditCountryPlatformId }, auditCountryPlatform); }