ORM, EDM, ESQL, Entity Framework, LINQ to SQL, LINQ to Entities - Confused?
Recorded at:
Microsoft's Track Record...
by
Giorgio Galante
Still completely confused!
by
Tim Barker
What I would like to see as a user of both NHibernate and LINQ to SQL, is Microsoft to open up the LINQ to SQL provider mechanism so that database vendors can implement support, and Microsoft get over its Not Invented Here syndrome and kill the Entities Framework and put its backing behind NHibernate. It would not hurt Microsoft to pay for development of a plugin to Visual Studio to support NHibernate based development and to perhaps put some money into NHibernates development for it to improve far beyond anything the Entities Framework will ever be.
The ship has really sailed for the Entities Framework, the release made in .NET 3.5 SP1 was a massive mistake and should have been pushed back until .NET 4.0 so that you could have produced something worth using. Many people today choose LINQ to SQL for simpler projects or where there are more inexperienced developers, or they choose NHibernate (or something that sits on top of) for the more complex scenarios (and in combination with Spring.NET). I just don’t know what the point of the Entities Framework is.
Correction, Eric
by
Frans Bouma
So it's just a business decision, as we've to compete with a free framework supported by MS which is installed on everybody's system. :) Also the reason why we'll also support Linq to Sql and nhibernate. :) I thought I'd clear that up a bit ;).
Re: Microsoft's Track Record...
by
Eric Nelson
Re: Still completely confused!
by
Eric Nelson
EF 4.0 is a decent ORM but it takes a dependency on .NET 4.0. Therefore pre .NET 4.0 there are better choices than EF. However if you can go with .NET 4.0 then I think EF is a very good choice in most but not all cases. At TechEd europe this week the two EF sessions have been very well attended (one full with folks sitting outside). EF 4.0 will be widely adopted and in the main folks will be very happy with it.
Re: Correction, Eric
by
Eric Nelson
I certainly wasn't implying that you suddenly felt EF rocked - only that you were indeed making a smart business decision to support an ORM runtime that will likely become very widely adopted.
This session in from March 2009
by
Eric Nelson
EF
by
Giorgio Galante
Licenses = (from license in db.Licence.Include("SoftwareVersion.Software.SoftwareVendor") where license.Category.Id==CategoryId select license).ToList();
I have to use a string to specify the 'eager' loading...really? That's terrible, not compile-time checkable, etc.
I've also noticed in the EDMX's Designer source file where the entities are generated, that no metadata about the underlying storage is made available programmatically. Things like field length, nullable, etc... LLBLGen makes all that information.
I just can't really see why Microsoft with all its resources, can't provide a more comprehensive solution than a very small company (or NHibernate for that matter) on its 4th (at minimum) attempt.
I'm not trying to put down EF, or the EF team's efforts... I'm sure you guys will eventually get it right.
Re: EF
by
Giorgio Galante
Two, I'm working SQLCE 3.5 and I'm using identity pk's...which I rudely found out are not supported by EF:
{System.NotSupportedException: Server-generated keys and server-generated values are not supported by SQL Server Compact.
at System.Data.SqlServerCe.SqlGen.DmlSqlGenerator.GenerateReturningSql(StringBuilder commandText, DbModificationCommandTree tree, ExpressionTranslator translator, DbExpression returning)
at System.Data.SqlServerCe.SqlGen.DmlSqlGenerator.GenerateInsertSql(DbInsertCommandTree tree, List`1& parameters, Boolean isLocalProvider)
at System.Data.SqlServerCe.SqlGen.SqlGenerator.GenerateSql(DbCommandTree tree, List`1& parameters, CommandType& commandType, Boolean isLocalProvider)
at System.Data.SqlServerCe.SqlCeProviderServices.CreateCommand(DbProviderManifest providerManifest, DbCommandTree commandTree)
at System.Data.SqlServerCe.SqlCeProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree)
at System.Data.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree)
at System.Data.Common.DbProviderServices.CreateCommand(DbCommandTree commandTree)
at System.Data.Mapping.Update.Internal.UpdateTranslator.CreateCommand(DbModificationCommandTree commandTree)}
Next: It appears that there's no simple way to set a FK field value on an associated object without re-querying the database. Let me explain - let's say we have an Order entity that has a StatusId FK that references a Status table. I want to simply say order.StatusId=12345 because I know what the right value is. I have not find a way to do this. I've wound up just re-querying the database to get the Status object and assign it to the order.
Come on Microsoft. How could you guys even release this as a beta 2?
Re: EF
by
Justin Spaey
"I have to use a string to specify the 'eager' loading...really? That's terrible, not compile-time checkable, etc."
There's an easy fix for that. See www.codetuning.net/blog/post/Entity-Framework-c...
"How could you guys even release this as a beta 2?"
That's why it's called 'beta'
Re: EF
by
Giorgio Galante
As to the 'beta' comment - the overall design and philosophy came from the ivory tower (how else could they explain how they were so off-base in EF v1?) So now they're handcuffed by v1's mistakes...Sure they can make changes, but they won't start over from scratch.
I'm writing a series of posts on my blog that talks about my main issues with EF (v4 included.) You'll be able to find it at www.giorgiogalante.com.
Re: EF
by
Justin Spaey
EF v1 is far from perfect and EF v4 probably won't be either, but I feel they are at least going in the right direction. IMHO, the biggest threat to EF at the moment is the amount of time you have to wait between updates. If EF v4 RTM rolls out and receives negative reception, developers arent't going wait until VS 2012 to see if things improve.
Re: EF
by
Giorgio Galante
Why can't Microsoft just do what it does best, look at what others are doing, copy the best ideas, and then improve it iteratively?




Hello stranger!
You need to Register an InfoQ account or Login to post comments. But there's so much more behind being registered.Get the most out of the InfoQ experience.
Tell us what you think