I just found that Entity Framework (4.0) can stumble on One-To-One relationships if the EDMX's schema storage layer (SSDL) is missing the association that represents the Foreign Key in the database. I suppose this makes sense, but it's only obvious to me in hindsight. I don't know how my EDMX ended up missing the SSDL... Continue Reading →
Don’t Reuse Context with Entity Framework Self Tracking Entities
With EF Self Tracking Entities, it appears that using a single context for a "read" and then a subsequent "save" does not work. I guess I could let this one go as "By Design", but that doesn't mean I have to like it… The Scenario: EF Self Tracking Entities for an MVC 3 site I... Continue Reading →
WPF & Entity Framework 4 – Tales from the Trenches
I recently presented "WPF & RF4 - Tales from the Trenches" at the Cleveland .NET SIG. This presentation reviews tips, tricks, and lessons learned from building real world apps with Windows Presentation Foundation 4.0 and Entity Framework 4.0. Whether you’re doing desktop, Silverlight, or web development, the EF T4 template tweaks, MVVM usage, Undo/Redo implementation,... Continue Reading →
.NET SIG: "Bag O’ Tricks – WPF and Entity Framework" (Oct 12th)
Just wanted to plug my upcoming presentation at the Cleveland .NET SIG…. Oct 12th at the Microsoft offices in Independence, OH. Topic will be "Bag O' Tricks: WPF and Entity Framework" I plan to share lessons, tips, and tricks from my experiences with WPF 4.0 and Entity Framework 4.0. Even if you aren't using WPF,... Continue Reading →
LinqKit and Dynamically building arbitrarily complex Linq Queries
In some cases, I need to be able to build a query that has a variable set of OR conditions. This is not simple with the default language constructs and extension methods. It’s simple to dynamically build an expression that includes AND parameters, because that is what the WHERE() extension method does. Not so easy for... Continue Reading →