Entity Framework

There are 5 entries for the tag Entity Framework

Something you might not know about Entity Framework model generation

Well, this was something I didn’t know about Entity Framework model generation – and that’s that there are a couple of differences to the generated model depending on whether your SQL Server is running 2005 or 2008. It’s obvious really when you think about it, but when you’ve been using EF for a while without coming across any issues it can trip you up a little. In my recent case, it took a few months of working on a distributed project where developers/test/production were using a mix of server versions before it cropped up – the issue and...

Microsoft.Data.dll - “Someone on the Internet is wrong!”

I’ve had a few posts on the topic of Microsoft.Data.dll sitting open in my browser for a few days, and I keep coming back to them trying to work out what I think of it. In some ways it doesn’t matter, because I’m never going to use it – which is fine, because I’m not the intended demographic. If you’ve not seen it already and want to get enraged/interested (pick one!), then basically the syntax is a simplification of ADO.NET and LINQ allowing queries such as the following: using (var db = Database.OpenFile("Northwind")) { ...

EF4 object deleting quirks

A while back I came across a slight issue when deleting an entity using EF4, which ended up manifesting as this exception: System.InvalidOperationException: The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted. If you’re using EF4...

A non sensationalist post about EF4

I have a few things I want to write about the Entity Framework 4 over the next couple of weeks – but first, I need to post something rather short and simple, so here it goes: I’m currently using EF4 on a customer project in Europe. It’s working fine. It’s doing its job. We have no major complaints so far. There, done. A rather boring posting indeed, but I didn’t want to start talking here about EF4 in an overly negative way! Tags: Microsoft, ASP.NET, Entity Framework

Some light reading on the Entity Framework

First, Danny Simmons post titled "Why use the Entity Framework" clarifies Entity Framework vs. traditional ADO.Net, Entity Framework vs. LINQ to SQL,  Entity Framework vs. nHibernate etc. Frans Bouma (LLBLGenPro etc) has a followup piece, titled Why use the Entity Framework? Yeah, why exactly? Finally, included as a reference, Frans Bouma's essay titled The Database Model is the Domain Model is useful for anyone who's not read an awful lot about OR/M tools and needs a quick primer. I'm mostly posting these for reference purposes, and partly as Doug might be interested in reading them (/wave) when he returns to places with Internet...