public async Task <ActionResult <IssuerActive> > PostIssuerActive(IssuerActive issuerActive) { _context.IssuerActive.Add(issuerActive); await _context.SaveChangesAsync(); return(CreatedAtAction("GetIssuerActive", new { id = issuerActive.IsaId }, issuerActive)); }
public async Task <IActionResult> PutIssuerActive(Guid id, IssuerActive issuerActive) { if (id != issuerActive.IsaId) { return(BadRequest()); } _context.Entry(issuerActive).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!IssuerActiveExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }