Supporting MS Access - somehow - is there any likelihood?

Topics: General
Jan 2, 2013 at 3:35 PM

This might be a daft question but I'm stuck with having to write against MS Access 2010 and would like EF5 to help me rather than writing home grown generators/raw sql or learning Nhibernate.

Having attempted to generate a data dictionary from it once, I realise it's not all that self describing in a SQL Server way so maybe this is the issue (as in, "not a real database").

Are there enough folks that would benefit from this to make it a worthwhile addition to EF5? Or is anyone planning on doing this?

I've <2 years full / part time coding or sql experience so it might be a touch advanced for me to build it myself - at least for the moment! :).

Very grateful for any opinions offered!

Developer
Jan 2, 2013 at 4:37 PM

Supporting database in EF5 terms means creating an EF provider for this database. In general it should be possible to add support for Access as it was possible for third party companies to add support for Oracle, MySql, DB2 just to name a few. However it is a bit complicated. Here are some resources that should help you try and see what it would take to create an EF provider:
EF5 sample provider: http://code.msdn.microsoft.com/Entity-Framework-Sample-6a9801d0

Writing an EF enabled provider (unfortunately only two first parts are available):
http://blogs.msdn.com/b/adonet/archive/2011/01/05/writing-an-ef-enabled-ado-net-provider.aspx
http://blogs.msdn.com/b/adonet/archive/2011/01/06/writing-an-ef-enabled-ado-net-provider-part-2.aspx

Here is some documentation on msdn:
http://msdn.microsoft.com/en-us/library/ee789835.aspx

Note that in EF6 the provider model changed a little bit so EF5 provider will not work with EF6. However it should be realtively easy to move an EF5 provider to EF6 world.

You can also decide what you want to support and what you don't want to support. For instance you may not want to support spatial types for an Access provider. Another decision to make is whether you want/need to be able to use EF Designer or not. It is much easier to create a provider that works for exisiting databases only and then try to add support for the EF Designer and/or CodeFirst.