O'Reilly logo

Entity Framework 4 in Action by Daniele Bochicchio, Marco De Sanctis, Stefano Mostarda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Working with functions and views

 

This chapter covers
  • Using defining queries
  • Creating custom database functions
  • Creating model defined functions

 

In the previous chapter, you saw that you can embed native SQL commands into the storage model of the EDM to simulate stored procedures. The same idea can be applied to create custom views that aren’t on the database. Creating such views can allow you to write simpler queries, easing the development process.

Another thing that eases querying is the use of database and model functions. These are pieces of code that can be reused across different queries, avoiding repetitive code. In Entity Framework 1.0, these functions could be used only via Entity SQL, but now they’re available in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required