コード例 #1
0
        public async Task <ActionResult <IssuerActive> > PostIssuerActive(IssuerActive issuerActive)
        {
            _context.IssuerActive.Add(issuerActive);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetIssuerActive", new { id = issuerActive.IsaId }, issuerActive));
        }
コード例 #2
0
        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());
        }