[HttpGet("{id}", Name = "GetCommandeById")]//route
        public ActionResult <CommandeReadDto> GetCommandeById(int id)
        {
            var commandItem = _repository.GetConmmandeById(id);

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

            return(Ok(_mapper.Map <CommandeReadDto>(commandItem)));
        }