{STATIC} hippo

...on becoming a great developer...
posts - 39, comments - 14, trackbacks - 0

My Links

Archives

Post Categories

June 2010 Blog Posts

Huge EFing Bug!

Thanks to Keith (comment #1 at http://weblogs.asp.net/johnkatsiotis/archive/2010/04/28/huge-ef4-inheritance-bug.aspx#7464062) for that title, btw. After coming from NHibernate, EF4 is an enormous pain to work with.  Unlike NHibernate, which basically lets you map any relationship you can dream of, EF4 has a lot of issues with inheritance.  Here’s a pretty big one IMO: Take a look at this object hierarchy: Before I continue, if you think we’re working on an edge case I have to disagree.  One of the tenets of OOP is the idea of encapsulation – there’s no reason a base class shouldn’t be able...

posted @ Tuesday, June 08, 2010 2:49 PM | Feedback (0) | Filed Under [ c# Entity Framework ]

EntityFramework caching woes

When you retrieve an entity from the database, Entity Framework handles lazy loading for you by creating a proxy for your model class.  There is, however, a little caveat.  Take the following code: 1: using (MSEntities ent = new MSEntities("name=MSEntities")) 2: { 3: // I already added Microsoft to the database, with ID 1 4: Employee billGates = new Employee() ...

posted @ Tuesday, June 01, 2010 12:25 PM | Feedback (0) | Filed Under [ Entity Framework ]

Powered by:
Powered By Subtext Powered By ASP.NET