コード例 #1
0
        public HttpResponseMessage SetState(ProductStateModel productStateModel)
        {
            ProductStateDto productStateDto = this.mapper.Map <ProductStateModel, ProductStateDto>(productStateModel);

            this.productAppService.SetState(productStateDto);

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
コード例 #2
0
 public void SetState(ProductStateDto productStateDto)
 {
     using (NpgsqlConnection connection = this.databaseConnectionFactory.Instance.Create())
     {
         ProductState productState = this.dtoToEntityMapper.Map <ProductStateDto, ProductState>(productStateDto);
         this.productService.UpdateState(connection, productState);
     }
 }