Logging Entity Framework Queries to Look for Perf Improvement Opportunities

Monday, February 16 2009        

One of the big questions people have about Entity Framework's dynamically generated queries is "what does the store query look like?", immediately followed by "is that store query acceptable"? There are a few ways to see what the store generated queries look like. One is to use ObjectQuery.ToTraceString...

read more...

LINQ to Entities, Entity SQL, Parameterized Store Queries and SQL Injection

Sunday, February 08 2009        

Last week, I was demoing some basic Entity Framework queries to a client and explaining that the store queries are parameterized, alleviating one area of concern. But when we looked at SQL Profiler the query was not parameterized. Why was this? The query I had used was: var query = from c in context...

read more...

Creating an ADO.NET Entity Framework Entity Data Model

Tuesday, August 12 2008        

Originally published on DataDeveloper.net In this tutorial, you will create a new Entity Data Model inside an Class Library Project. The data model will be built from the AdventureWorksLT database. The project can be used in (Windows, Console, Web, other class libraries etc) by referencing this project...

read more...

Use an Entity Framework Entity as a WinForms Data Source

Tuesday, August 12 2008        

December 17, 2007 12:58 AM In this tutorial, you will create a Windows Forms Data Source from an Entity in an Entity Data Model. This tutorial works with a simple entity and does not include navigation properties. Stay tuned for another tutorial that shows off Entity Frameworks navigation properties...

read more...

Using Stored Procedures for Insert, Update & Delete in an Entity Data Model

Tuesday, August 12 2008        

Originally posted on DataDeveloper.net This tutorial demonstrates how to wire up stored procedures from your database to an entity in your Entity Data Model. This basic tutorial works with three simple stored procedures which I added to the AdventureWorksLT database: InsertCustomer, UpdateCustomer and...

read more...

ASP.NET DataBinding with LINQ to Entities

Tuesday, August 12 2008        

(Note: Originally posted on datadeveloper.net using Entity Framework Beta 3) In this tutorial, you will create a read-only ASP.NET Web page which uses LINQ to Entities as the source for data-bound controls. The website will have a drop down list of Customers. When a customer is selected, the customer...

read more...

WPF Databinding with Entity Framework

Tuesday, August 12 2008        

(Note Originally posted on DataDeveloper.NET in January 2008) In this tutorial, you will create a simple Windows Presentation Form which uses LINQ to Entities queries against an Entity Framework Entity Data Model as the source for controls. The page will have a drop down list of Customers. When a customer...

read more...

Many to Many Relationships in the Entity Data Model

Tuesday, August 12 2008        

Originally posted on datadeveloper.net This tutorial will explain how many-to-many relationships appear in the Entity Data Model. What is a Many-to-Many relationship? A many-to-many relationship is one where two data tables or entities have multiple rows that are connected to one or more rows in the...

read more...