Side effects of first class Associations

You’ve probably all heard someone say that Entity Data Model (EDM) and more specifically the Entity Framework (EF) treat associations as first class concepts. This sentence, seems reasonably benign, but it has a profound effect on the Entity Framework’s behavior. Allow me to illustrate by way of an example: Imagine you want to model a…

9

LINQ to Objects and Buffer<T>

I was debugging a problem a couple of days ago, when I learned something interesting. I had some code that looked like this: foreach(Employee e in manager.Manages) {     … } The manager.Manages property returned a custom implementation of ICollection<Employee> that lazy-loads it’s data from somewhere when enumerated. I wanted to change the code to…

3

SaveChanges(false)

Most of the time the Entity Framework (EF) can manage transactions for you. Every time you Add an Entity, Delete an Entity, Change an Entity, Create a Relationship or Delete a Relationship in your .NET code, these changes are remembered by the EF, and when you call SaveChanges()these are converted to appropriate native SQL commands…

6

Virtuoso – Entity Framework compatible ADO.NET provider

Now this is worth a mention. Kingsley has produced a ADO.NET provider for their virtuoso product which is Entity Framework compatible. Which means in theory access to SQL, XML and RDF data via the Entity Framework. It also supports a raft of third party databases, like Oracle, Informix, Progress etc etc. Now I haven’t tried…


LINQ… the board game

About a week ago I was wandering through Crossroads mall in Bellevue, and with my wife’s new camera in hand, I spotted this: Now I’m sure at least one of you have actually played this, but I’d never even heard of it. If you know me, you know I’m vertically challenged, so… I just couldn’t…


Nullable=”False”… but when exactly?

If you look at the EDM and in particular the metadata it considers important, one thing is clear: Persistence is the Priority. For example this: <Property Name=”Firstname” Type=”String” Nullable=”False”/> Tells us that the Firstname property can’t be null when persisted. If however the EDM Type System is used to describe the signature of a function,…

5