You will find numerous libraries supplying Linq abilities to C# code getting together with a MySql database. Which one of these is easily the most stable and functional on Mono?
Background (mostly irrelevant): I've got a simple C# (.Internet 2.) program upgrading values inside a MySql database. It's performed nightly using a cron job and operates on a Pentium 3 450Mhz, Linux + Mono. I wish to rewrite it using Linq (.Internet 3.5) mostly being an exercise (I haven't yet used Linq).
The only real (free) linq provider for MySql is DbLinq, but it's a lengthy way from production-ready.
There's also MyDirect.Internet that is commercial, however i often hear mixed reviews of it's capacity.
I have read that MySql is going to be applying the Linq to Organizations API for that 5.3 version from the .internet connector, but I'm not sure if you will find a period for your. Actually, MySql continues to be totally quiet about Entity Framework support for several weeks.
Addendum: The most recent discharge of the MySql Connector/Internet 6. has support for that EF based on the release notes. I've no clue how stable/helpful this really is, so I'd like to listen to anyone who have attempted it.
Based on the Mono roadmap I am unsure if Linq can be obtained for mono?
A minimum of a number of Linq may be obtainable in the latest release, but Linq to DB shows up for Mono 2.4 (February 2009)
Unsure about Mono, however i just began using LightSpeed which supports LINQ-to-MySQL.
at this time around you can't use linq to sql, you may consider a 3rd party linq mysql provider or linq to organizations. linq to sql only works best for sql server databases.
LINQ to SQL is only a ORM layer using the energy of expressions to really make it simple to construct queries inside your code.
If you're just calling adhoc queries for the tool, there's little want to use LINQ, it simply adds an additional layer of abstraction for your code.
I've attempted the tutorial at http://world wide web.primaryobjects.com/Content management systems/Article100.aspx. This uses dblinq/dbmetal to create the information context class and classes for every table.
The code unsuccessful in the first attempt by having an unhandled exception (MySql.Data.Types.MySqlConversionException: Not able to transform MySQL date/time value to System.DateTime"). Searching revealed this ought to be easily solved by appending "Allow Zero Datetime=True" towards the connection string. Unfortionately this switched out to not solve my problem. Thinking the MySQL .Internet Connector ended up being to blame I performed the SQL produced by dblinq with no linq2sql intermediary layer while using MySQL Connector. This time around the same happened. Tables that do not possess a date column did use DbLinq. So, from my experiment To be sure with Adam, DbLinq is really a lengthy way from production ready.