public void ShouldUpdateManufacturerModel()
        {
            _updateManufacturerModel.ToEntity(_entity);

            Assert.Equal(1, _entity.Id);
            Assert.Equal("Avon", _entity.Name);
            Assert.Equal("England", _entity.Country);
        }
        public IActionResult UpdateManufacturer([FromBody] UpdateManufacturerModel model)
        {
            try
            {
                var getManufacturer = _manufacturerRepository.GetById(model.Id);

                if (!getManufacturer.isStatusCodeSuccess() || getManufacturer.Data == null)
                {
                    return(NotFound());
                }

                var updateResponse = _manufacturerRepository.Update(model.ToEntity(getManufacturer.Data));

                if (updateResponse.isStatusCodeSuccess() && updateResponse.Data != null)
                {
                    return(StatusCode(updateResponse.StatusCode, ManufacturerModel.ToModel(updateResponse.Data)));
                }
                else
                {
                    return(StatusCode(updateResponse.StatusCode));
                }
            }
            catch (Exception e)
            {
                return(InternalServerError());
            }
        }