Showing Posts for Entity Framework

SQL helper script to generate properties for an Entity Framework model

Michael Roma on Oct 16, 2013

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.

  • C#
  • SQL
  • Entity Framework

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

Michael Roma on Apr 3, 2013

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.

  • ASP.NET
  • C#
  • Entity Framework

Using the LIKE filter in Entity Framework

Michael Roma on Mar 19, 2013

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

  • C#
  • Entity Framework

Using Contains in Entity Framework for WHERE IN clause

Michael Roma on Mar 16, 2013

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.

  • C#
  • Entity Framework

Easy way to get distinct values from a .NET List

Michael Roma on Nov 25, 2012

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

  • C#
  • Entity Framework

Counting records in associated tables in Entity Framework

Michael Roma on Aug 14, 2012

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

  • C#
  • Entity Framework
  • SQL

Using Inheritance in Entity Framework

Michael Roma on Aug 14, 2012

C# Examples on how to use inheritance in Entity Framework

  • C#
  • Entity Framework
  • SQL

Entity Framework DbSet Helper functions for Insert and Update

Michael Roma on Jul 13, 2012

C# DbSet extension functions for Add and Update

  • C#
  • Entity Framework

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

Michael Roma on Jun 28, 2012

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

  • C#
  • Entity Framework