public HttpResponseMessage SetState(ProductStateModel productStateModel) { ProductStateDto productStateDto = this.mapper.Map <ProductStateModel, ProductStateDto>(productStateModel); this.productAppService.SetState(productStateDto); return(new HttpResponseMessage(HttpStatusCode.OK)); }
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); } }