public async Task <ActionResult <AdvOrderDetail> > PostAdvOrderDetail(AdvOrderDetail advOrderDetail)
        {
            _context.AdvOrderDetail.Add(advOrderDetail);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetAdvOrderDetail", new { id = advOrderDetail.AdvOrderDetailId }, advOrderDetail));
        }
        public async Task <IActionResult> PutAdvOrderDetail(int id, AdvOrderDetail advOrderDetail)
        {
            if (id != advOrderDetail.AdvOrderDetailId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }