Entity Framework Extensions Collection

In the lasts months I’ve been working on a project where I use Entity Framework. For this project I was developing some extension methods that facilitate working with EFX. My favorites are:

  • Include: allows to configure the eager load with expressions rather than strings.
  • EnsureLoad: allows to load a collection or reference safely with lazy load.
  • LoadByKey: If an object is in the context this method returns it. Otherwise return the object from the database.
  • ToTraceQuery: similiar to .ToTraceString( ) but better :).

Download the code of this extensions from here.

.NET Tools

Rodolfo Finochietti View All →

Uma's and Gino's father, and a programmer ;)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: