public async Task <IActionResult> PutApplicationMaster(int id, ApplicationMaster applicationMaster)
        {
            if (id != applicationMaster.ApplicationId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #2
0
        public async Task <IActionResult> PutTicketmaster([FromRoute] int id, [FromBody] Ticketmaster ticketmaster)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != ticketmaster.TicketId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }