public async Task <IActionResult> PostInventoryActionHistory([FromBody] InventoryActionHistory inventoryActionHistory)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.InventoryActionHistories.Add(inventoryActionHistory);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetInventoryActionHistory", new { id = inventoryActionHistory.InventoryActionHistoryId }, inventoryActionHistory));
        }
        public async Task <IActionResult> PutInventoryActionHistory([FromRoute] Guid id, [FromBody] InventoryActionHistory inventoryActionHistory)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != inventoryActionHistory.InventoryActionHistoryId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }