Monthly Archives: February 2009

I am in vacation

I am in vacation [:)] But where does a Microsoft addict like me go for his vacations? …

Posted in 8364, 7670 | 1 Comment

EF and Culture

Imagine that you have a localizable DB like this: Products ProductID (PK) Name ProductDescriptions ProductID (PK, FK to Products) Culture (PK) Text Then we want only one public entity type: Product ProductID (Key) Name Description How to do this? First … Continue reading

Posted in 7675, 7674 | 2 Comments

Code factorization with delegate

I want to write an extension method Sum on IEnumerable<int> and an extension method Sum on IEnumerable<decimal>. public static int Sum(this IEnumerable<int> source) {     int value = 0;     foreach (int item in source)         value += item; … Continue reading

Posted in 7671, 7672 | Leave a comment

EDM Designer V0.9

My first EDM Designer version was a viewer. It’s now a real designer. You can realize all the EDM mapping scenarii without writing xml yourself! [:)]… except for Functions mapping (with Stored Procedures). I am very happy to see the interest … Continue reading

Posted in 7671, 9640, 7675, 7674, 8708 | 2 Comments

Integrate cache in the query.

One of my customers wanted to do some LINQ To Entities queries with a where. For example, he wants to do context.EmployeeSet.Where (e => e.Manager == null). Ok. Now he wants to include the context additions and to exclude the context … Continue reading

Posted in 7671, 7674 | Leave a comment

TPH, how to change the entity type (ie: to change the column mapped on conditions)?

Imagine the following scenario: I use Northwind. I add on Employee table two columns: OutDate and OutType. In my edmx, I have an abstract entity type Employee, inherited by EmployeeInActivity (OutDate Is Null) and OutEmployee (OutDate Is Not Null). OutEmployee … Continue reading

Posted in 7671, 7675, 7674 | 1 Comment