Posted under: Entity Framework


SQL helper script to generate properties for an Entity Framework model

Wed Oct 16 2013C#SQLEntity Framework

This post shows a T-SQL script that can be used to generate the properties for a class that correspond to to a field in a database table. This can be used with Entity Framework.

Read More ››

Connecting to a SQL Compact database using Entity Framwork in ASP.NET

The following shows how to setup a proper connection string and DbContext in Entity Framework in order to connect to a SQL Compact database in ASP.NET.

Read More ››

Using the LIKE filter in Entity Framework

Tue Mar 19 2013C#Entity Framework

Example on how to use the LIKE functionality in T-SQL in Entity Framework

Read More ››

Using Contains in Entity Framework for WHERE IN clause

Sat Mar 16 2013C#Entity Framework

A common problem with parameterized queries is when you have the need for a WHERE IN clause and the IN list is variable. This is solved with Entity Framework using the Contains methods of the list.

Read More ››

Easy way to get distinct values from a .NET List

Sat Nov 24 2012C#Entity Framework

The follow example shows how to get a list of objects that are distinct based on a property's value.

Read More ››

Counting records in associated tables in Entity Framework

Mon Aug 13 2012C#Entity FrameworkSQL

The following example shows how to query a table and count records associated in another

Read More ››

Using Inheritance in Entity Framework

Mon Aug 13 2012C#Entity FrameworkSQL

C# Examples on how to use inheritance in Entity Framework

Read More ››

Entity Framework - how to specify the table name for an entity class manually

Thu Jun 28 2012C#Entity Framework

How to specific the table name on an entity class in Entity Framework

Read More ››