Linq2sql running on Sql Compact Edition - calling on VistaDb to clean-up their act

There is a lot of misunderstanding on this subject. Even competitors of Microsoft seem to not understand fully what Linq2sql is made of or what it actually covers. One of these competitors is Vistadb that says on their product comparison:

SQL CE users will have to wait until the Entity Framework release before they can use LINQ against a SQL CE database.

I sent them an email to warn them that their comparison was erroneous, and an exchange has started in which they've assured me I was in the wrong and have neither acknowledged the confusion nor updated their comparison. As such I feel inclined to bring the conversation to the community, to get knowledge out there. I have not received their authorization to reproduce the exchange, so I'll have to represent as accurately as I can, in my own word, the different points they made. And I hereby invite them, and you dear reader, to the conversation.

Before you begin reading this, please note I do like the work the vistadb guys have been doing, I think it's a great internal database, and I probably would use their product still. But with greatness comes responsibility yada yada.

There is no provider model in linq2sql

This is an easy mistake to make if you don't spend your time in reflector. Linq2sql *has* a provider model that has been marked as internal late in the process, as described on the Wayward Weblog. If I was to guess the reasoning, I'd guess that there would've been a conflict of interest for partners to support both the Titanic Entity Framework model that leverages updates to the core ado.net classes and a provider model where they would've had to rewrite the sql code generation from the ground-up in linq2sql.

But I would concede that, as it's not public, for all intent and purposes, there is no provider model *you can build against*.

Linq2Sql gives you a Visual Studio GUI and a mapping tool

This is accurate, and very relevant to our conversation. There is several aspects to linq2sql.

  • A provider model, with a provider implementing access to Sql Server 2000, 2005 and 2008, as well as Sql Compact Edition 3.5. This is the bit of code responsible for translating between the model and the sql code
  • An abstract mapping model defining types such as MetaTable, MetaType and MappingSource, that let you implement different mappings. Linq2sql ships with two of those, one for xml mapping files, one for attributes.
  • Visual studio ships with a designer that lets you generate an xml mapping file through a point-and-click UI. This only supports the full-fledge Sql Server, and this is where the confusion may be coming from.

So there is a bit more than a GUI and a mapping tool. It's a GUI, a mapping model and a provider model.

Sql Compact Edition queries don't support Linq, the compiler does

Well I've struggled quite a bit to understand that one. Linq queries are compiled by the compiler as extension methods or interfaces defined by the implementations of Linq (Xml, object, Sql, etc). However, I fail to see any connection with Sql Ce itself, as the one querying the database is the provider that, indeed, supports Linq2sql just fine. The provider is indeed distributed with Sql Ce 3.5.

Microsoft does not use Linq2sql as a term that covers Sql Compact Edition and it's unsupported

I don't see how it relates to the technical conversation. And the download page of Sql CE 3.5 specifies the following.

SQL Server Compact 3.5 introduces a host of new features including LINQ to SQL support

Again, it doesn't seem like unsupported to me.

Conclusion

Vistadb is a strong product in its own right. The product comparison however contains a mistake and the company hasn't responded to the two emails I've exchanged with a catchall email address.

All in all, this highlights two points. Microsoft has a communication problem around Linq2sql; Iif your competitors don't understand your product well, imagine your customers. Secondly, if you want to put product comparisons you should *really* double-check your facts. Responding in person to emails rather than through a customerservices@... address, and double-checking before responding the second time would probably have kept me a bit happier.

Ads

Comment