Welcome to MSDN Blogs Sign in | Join | Help

April 2009 - Posts

Interesting reads
Over the weekend in between run throughs that I did prepping for a webcast, I did some catch-up blog reading. Lots of interesting stuff. Recording and sharing here for posterity: Entity Framework Simon Segal has a interesting post on Entity Framework Read More...
Corrected Tip 15 - How to avoid loading unnecessary properties
I've made a few important corrections to Tip 15 . I've corrected the bit that said the UPDATE SQL includes original values of Updated Properties in the WHERE clause. At the time I was consciously attempting to simplify things a little, but as Tanveer Read More...
Tip 15 - How to avoid loading unnecessary Properties
UPDATE: Made a couple of important corrections re-which Original Values are required. Problem: Imagine if you query blog posts: var myPosts = from post in ctx.Posts orderby post.Created descending select post; Just so you can output the post titles etc. Read More...
Tip 14 - How to cache Entity Framework Reference Data
Scenario: In order to make applications perform it makes a lot of sense to cache commonly used reference data. Good examples of reference data include things like States, Countries, Departments etc. Generally you want to have this data readily at hand, Read More...
An analogy: Good UIs and Fluent APIs
Background A while back I was writing a web app to try the Entity Framework and MVC together. I knew the pain points would probably be around Foreign Keys, or at least the lack of them in .NET 3.5 SP1 (FKs are now available by default in .NET 4.0 ). So Read More...
Tip 13 - How to Attach an Entity the easy way
The Problem: In some of earlier tips we talked about using Attach to load things into the ObjectContext in the unchanged state without wearing the cost of doing a query. Attach is the weapon of choice if performance is your goal. Unfortunately our APIs Read More...
Tip 12 - How to choose an Inheritance Strategy
What strategies does the Entity Framework support? The Entity Framework supports 3 primary inheritance strategies: Table Per Hierarchy (TPH): In TPH, all data for a type hierarchy is stored in one table, and there is a discriminator column that is used Read More...
Tip 11 – How to avoid Relationship Span
Background and Motivation: In my last post on EF Jargon I introduced the concept of Relationship Span. If you remember Relationship Span is basically responsible for compensating for the lack of Foreign Key properties* in your Entity. Relationship Span Read More...
Tip 10 - How to understand Entity Framework jargon
The Entity Framework is pretty big, so when the Entity Framework team talks about things internally we tend to use jargon to increase communication 'bandwidth'. Unfortunately sometimes we let this Jargon slip into our APIs and communication. Now jargon Read More...
Page view tracker