<p>There are numerous libraries providing Linq capabilities to C# code interacting with a MySql database. Which one of them is the most stable and usable on Mono?</p>

<p>Background (mostly irrelevant): I have a simple C# (.Net 2.0) program updating values in a MySql database. It is executed nightly via a cron job and runs on a Pentium 3 450Mhz, Linux + Mono. I want to rewrite it using Linq (.Net 3.5) mostly as an exercise (I have not yet used Linq).</p>

[{'answer_id': 42250, 'author': 'John Boker', 'author_id': 2847, 'author_profile': 'https://Stackoverflow.com/users/2847', 'pm_score': 0, 'selected': False, 'text': '<p>at this time you cannot use linq to sql, you might look into a third party linq mysql provider or linq to entities.  linq to sql only works for sql server databases.</p>\n'}, {'answer_id': 42299, 'author': 'Adam Lassek', 'author_id': 1249, 'author_profile': 'https://Stackoverflow.com/users/1249', 'pm_score': 4, 'selected': True, 'text': '<p>The only (free) linq provider for MySql is <a href="http://code2code.net/DB_Linq/" rel="nofollow noreferrer">DbLinq</a>, and I believe it is a long way from production-ready.</p>\n\n<p>There is also <a href="http://www.devart.com/mysqlnet/" rel="nofollow noreferrer">MyDirect.Net</a> which is commercial, but I have heard mixed reviews of it\'s capability.</p>\n\n<p>I\'ve read that MySql will be implementing the Linq to Entities API for the 5.3 version of the .net connector, but I don\'t know if there\'s even a timeline for that. In fact, MySql has been totally silent about Entity Framework support for months.</p>\n\n<hr>\n\n<p>Addendum: The latest release of the MySql Connector/Net 6.0 has support for the EF according to the release notes. I have no idea how stable/useful this is, so I\'d love to hear from anybody who have tried it.</p>\n'}, {'answer_id': 42326, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 0, 'selected': False, 'text': '<p>LINQ to SQL is simply a ORM layer leveraging the power of expressions to make it easy to construct queries in your code.</p>\n\n<p>If you are just calling adhoc queries for your tool, there is little need to use LINQ, it just adds an extra layer of abstraction to your code.</p>\n'}, {'answer_id': 48780, 'author': 'Douglas Leeder', 'author_id': 3978, 'author_profile': 'https://Stackoverflow.com/users/3978', 'pm_score': 2, 'selected': False, 'text': '<p>According to the <a href="http://www.mono-project.com/Mono_Project_Roadmap" rel="nofollow noreferrer">Mono roadmap</a> I\'m not sure if Linq is available for mono?</p>\n\n<p>At least some of Linq might be available in the very latest release, but Linq to DB is listed for Mono 2.4 (Feb 2009)</p>\n'}, {'answer_id': 444779, 'author': 'marclar', 'author_id': 28118, 'author_profile': 'https://Stackoverflow.com/users/28118', 'pm_score': 2, 'selected': False, 'text': '<p>Not sure about Mono, but I just started using <a href="http://www.mindscape.co.nz/products/LightSpeed" rel="nofollow noreferrer">LightSpeed</a> and that supports LINQ-to-MySQL.</p>\n'}, {'answer_id': 1055142, 'author': 'Opflash', 'author_id': 98480, 'author_profile': 'https://Stackoverflow.com/users/98480', 'pm_score': 0, 'selected': False, 'text': '<p>I have tried the tutorial at <a href="http://www.primaryobjects.com/CMS/Article100.aspx" rel="nofollow noreferrer">http://www.primaryobjects.com/CMS/Article100.aspx</a>. This uses dblinq/dbmetal to generate the data context class and classes for each table. </p>\n\n<p>The code failed at the first attempt with an unhandled exception (MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime"). Googling revealed this should be easily solved by appending "Allow Zero Datetime=True;" to the connection string.\nUnfortionately this turned out not to solve my problem. Thinking the MySQL .Net Connector was to blame I executed the SQL generated by dblinq without the linq2sql intermediary layer using the MySQL Connector. This time no exception occured. \nTables which do not have a date column did work with DbLinq.\nSo, from my experiment I agree with Adam, DbLinq is a long way from production ready. </p>\n'}]
['https://Stackoverflow.com/questions/42212', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3205/']