public void ComposableScalarValuedFunctionTest()
 {
     using (AdventureWorks adventureWorks = new AdventureWorks())
     {
         try
         {
             adventureWorks.ufnGetProductListPrice(999, DateTime.Now);
             Assert.Fail();
         }
         catch (NotSupportedException exception)
         {
             Trace.WriteLine(exception);
         }
     }
 }
 public void ComposableScalarValuedFunctionLinqTest()
 {
     using (AdventureWorks adventureWorks = new AdventureWorks())
     {
         IQueryable<Product> products = adventureWorks
             .Products
             .Where(product => product.ListPrice <= adventureWorks.ufnGetProductListPrice(999, DateTime.Now));
         Assert.IsTrue(products.Any());
     }
 }