Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mySQL + LINQ to SQL in C#

I've been looking around for a definitive answer as to how to use LINQ to SQL with mySQL but can't seem to come up with anything. Does anyone have any experience / suggestions using the two together? In particular, I would like to avoid using string SQL statements.

Cheers

like image 808
keynesiancross Avatar asked Jan 10 '11 19:01

keynesiancross


People also ask

Can I use LINQ with MySQL?

LinqConnect is a lightweight, LINQ to SQL-compatible ORM solution with support for MySQL, Oracle, PostgreSQL, and SQLite.

Is LINQ converted to SQL?

LINQ to SQL translates the queries you write into equivalent SQL queries and sends them to the server for processing. More specifically, your application uses the LINQ to SQL API to request query execution. The LINQ to SQL provider then transforms the query into SQL text and delegates execution to the ADO provider.

Is LINQ to SQL still used?

LINQ to SQL was the first object-relational mapping technology released by Microsoft. It works well in basic scenarios and continues to be supported in Visual Studio, but it's no longer under active development.


1 Answers

MySQL isn't directly supported by Microsoft's LINQ to SQL provider, but there are several alternative ways you can use LINQ against MySQL. Take a look at using LINQ to nHibernate, or see here for LINQ providers against non-Microsoft databases.

like image 92
goric Avatar answered Sep 27 '22 16:09

goric