How to use Compiled Queries in Entity Framework

Posted by Goldytech under Others category on | Views : 4542
This snippet shows you how to use compiled queries with Entity Framework.

public void CompiledEF()

var compileqry=CompiledQuery.Compile<OMSEntities, IQueryable<Customer>>(
ctx =>
from cust in ctx.Customers
where cust.ContactTitle == "Manager"
select cust);


Comments or Responses

Login to post response