O'Reilly logo

Fluent Entity Framework by Rebecca M. Riordan

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

Parameterized queries

Since you build Entity SQL expressions as strings (and so Intellisense isn’t available) and because errors aren’t reported at compile time (and not necessarily at runtime), using literal values can be a little tedious. But in reality, you’ll hardly ever create query expressions with literals. In real applications, you’ll want to provide those values at runtime, and the Entity SQL ObjectQuery<T>.Parameters collection makes that easy, using the classic SQL @param syntax:

Image

Image Put On Your Thinking Hat

How’d you do?

SELECT VALUE ...

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