Possible Duplicate:
LINQ: Join MySql and SQL Server tables
I don’t think it’s possible but is there any way you can do a join on a table in a MYSQL database to a table in SQL server?
I rather expect I’ll need to make an array of data from MYSQL and programmatically use it against the data in the SQL Server but thought I’d check first!
One option is to link your MySql database through MS SQL Server. Then access both databases through your SQL Server DataContext. Here’s a couple examples of how to set up the link and docs:
http://www.ideaexcursion.com/2009/02/25/howto-setup-sql-server-linked-server-to-mysql/
http://sql-articles.com/blogs/creating-linked-server-to-mysql-from-sql-server/
Keep in mind that this approach (and any approach I can think of) won’t be particularly fast. There’s no magic to speed up the cost of relating data across databases and a network. It’s biggest benefit is that it presents a consistent and simple view of the data to the application developer.
Taken from
LINQ: Join MySql and SQL Server tables