コード例 #1
0
        public async Task <IActionResult> PutTblSupplyAvailable(int id, TblSupplyAvailable tblSupplyAvailable)
        {
            if (id != tblSupplyAvailable.ASupplyId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
コード例 #2
0
        public async Task <ActionResult <TblSupplyAvailable> > PostTblSupplyAvailable(TblSupplyAvailable tblSupplyAvailable)
        {
            _context.TblSupplyAvailables.Add(tblSupplyAvailable);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetTblSupplyAvailable", new { id = tblSupplyAvailable.ASupplyId }, tblSupplyAvailable));
        }