コード例 #1
0
        public IHttpActionResult GetProductOption(Guid productId, Guid id)
        {
            ProductOption productOption = db.GetOne(id);

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

            return(Ok(productOption));
        }
コード例 #2
0
        public void ProductOptionRepositoryGetOneTest()
        {
            //Arrange
            Guid guid = new Guid("0643ccf0-ab00-4862-b3c5-40e2731abcc9");

            using (ProductOptionRepository productOptionRepository = new ProductOptionRepository())
            {
                //Action
                ProductOption productOption = productOptionRepository.GetOne(guid);
                //Assert
                Assert.IsNotNull(productOption);
            }
        }