Database Reference
In-Depth Information
The output from the code in Listing 11-20 is as follows:
Query using eSQL...
Product Description: Family Camping Tent, Color Green
Product Description: Chemical Light
Product Description: Blue ground cover
Query using LINQ...
Family Camping Tent, Color Green
Chemical Light
Blue ground cover
How It Works
In the definition of the ISNULL() function in Listing 11-18, we need to match the name of the database function with
our function's name. Both have to be the same in spelling but not in case.
We defined the function not in the conceptual layer, as in previous recipes in this chapter, but in the store layer.
This function is already available in the database; we are simply surfacing it in the store layer for our use.
When we use the function in the eSQL statement, we need to fully qualify the namespace for the function. Here
that fully qualified name is EFRecipesModel.Store.ISNULL() .
To use the function in a LINQ query, we need to create the bootstrapping method. We are not returning an
IQueryable<T> , so no implementation of the method is required.
 
Search WWH ::




Custom Search