Category Archives: 7673

EF: Another (better ?) way to deal with POCO entities

If you want to have POCO entities and to keep at the same time, the context features like tracking, attaching automatically relationships, Lazy loadings, EF will generate a proxy which inherits your entity classes and which adds some code to … Continue reading

Posted in 10500, 7671, 7673, 7674 | 1 Comment

Reflector IL to C# Bug

I was watching Entity Framework code when I found this code: switch (this.<>1__state){    case 3:    case 4:        break;    default:        return;        try        {        }        finally        {            this.<A title="void System.Data.EntityModel.SchemaObjectModel.EntityContainerAssociationSet+d__0.m__Finally6();” href=”http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Data.Entity:3.5.0.0:b77a5c561934e089/System.Data.EntityModel.SchemaObjectModel.EntityContainerAssociationSet.d__0/m__Finally6()”><>m__Finally6();        }        break;} Very strange. It was the same with VB.Net. So I … Continue reading

Posted in 7671, 7672, 7673, 7678, 7806 | Leave a comment

Entity Cloner

I do an EntityCloner which can Clone an entity single or all the graph from one entity. To clone an entity, I use reflection but the problem of Reflection is it’s far. The way to Clone a product is always the … Continue reading

Posted in 7671, 7672, 7673, 7674 | 15 Comments

What do you think about private and protected?

I think it should be a great thing to have two notions: class private and instance private (and the same for protected). In my mind, in a lot of case, I shouldn’t be able to do this: class C1 { … Continue reading

Posted in 7671, 7672, 7673, 7678 | Leave a comment