Saturday, 1 February 2014

Querying the Entity Framework

 

 

Overview of Querying Options in Entity Framework

 

image

 

 

 

image

 

 

 

 

image

 

 

 

 

 

LINQ to Entity and Query Execution

 

 

image

 

 

 

 

image

 

 

 

 

Demo of LINQ to Entity

 

image

 

 

 

 

image

 

 

 

 

image

 

Note: Above approach will degrade performance of Query

 

 

 

Solution of Above problem

 

image

 

 

 

 

image

 

 

 

image

 

 

 

 

LINQ methods with LAMBDAS

 

image

 

 

 

image

 

 

 

 

 

Entity SQL

 

Entity SQL is more dynamic in nature.  If you want to provide functionality like below which dynamic in nature.  It should be selected in runtime by users.  Then better choice is Entity SQL.

 

image

 

 

 

image

 

 

 

image

 

 

image

 

 

 

 

Entity SQL Query Builder Methods

 

image

 

 

 

 

Returning Streamed data with Entity SQL

 

image

 

 

 

 

Database queries created by Entity Framework

 

image

 

 

 

 

image

 

 

 

image

 

 

 

 

Digging Deeper into LINQ to Entities

 

image

 

 

 

 

image

 

 

 

image

 

 

 

image

 

 

 

 

Query Projections

 

image

 

 

 

 

image

 

 

 

 

image

 

 

 

 

image

 

 

 

 

image

 

 

 

 

 

Navigation properties in Queries

 

image

 

 

 

image

 

 

 

Entity Collection Logic in Queries

 

image

 

 

 

image

 

 

 

 

image

 

 

 

image

 

 

 

image

 

 

 

 

Nested Queries and Joins

 

image

 

 

 

image

 

 

 

image

 

 

 

image

 

 

 

 

Grouping

 

image

 

 

 

image

 

 

 

 

 

Using Single and First in Queries

 

 

image

 

 

 

First method in queries

 

 

image

 

Note: It will throw exception when there is no rows in result set.

 

 

 

image

 

 

 

 

Single Method in Queries

 

image

 

 

 

image

 

 

 

image

 

 

 

 

Using Get Object By Key

 

 

image

 

 

 

 

image

 

 

 

 

image

 

 

Note: TryGetObjectByKey will not return any error if it does’t find any objects in-memory or DB.

 

 

 

 

 

Blogger Labels: Framework,Overview,Options,LINQ,Query,Execution,Demo,Note,Above,performance,Solution,LAMBDAS,users,Builder,Methods,data,Database,Deeper,Entities,Projections,Navigation,properties,Queries,Collection,Logic,Joins,Single,method,exception,Object,TryGetObjectByKey,error,memory

No comments:

Post a Comment