public async Task <IActionResult> UpdateStock(int pMoveOrderId, MoveOrderDto pMoveOrderDto)
        {
            try
            {
                var moveOrder = await _repo.GetStockAsyncById(pMoveOrderId);

                if (moveOrder == null)
                {
                    return(NotFound());
                }

                _mapper.Map(pMoveOrderDto, moveOrder);
                _repo.Update(moveOrder);

                var moveOrderUpdated = _mapper.Map <MoveOrderDto>(moveOrder);
                if (await _repo.SaveChangesAsync())
                {
                    return(Created($"/api/moveorder/id/{moveOrder.Id}", moveOrderUpdated));
                }
            }
            catch (Exception e)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Banco de Dados Falhou: " + e.Message));
            }

            return(BadRequest());
        }
        public async Task <IActionResult> AddStock(MoveOrderDto pMoveOrderDto)
        {
            try
            {
                var moveOrder = _mapper.Map <MoveOrder>(pMoveOrderDto);
                _repo.Add(moveOrder);

                var moveOrderSaved = _mapper.Map <MoveOrderDto>(moveOrder);
                if (await _repo.SaveChangesAsync())
                {
                    return(Created($"/api/moveorder/id/{moveOrder.Id}", moveOrderSaved));
                }
            }
            catch (Exception e)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Banco de Dados Falhou: " + e.Message));
            }

            return(BadRequest());
        }