locked
Can i use LINQ with MySql database? RRS feed

  • Question

  •  

    Hi all,

    Can i use LINQ with MySql database?

     

    If yes , what i need to do this?

     

     

    Regards

    Gunwant 

    Monday, November 19, 2007 12:32 PM

Answers

All replies

  • Hi Gunwant

     

    Yes, you can.

    Use LINQ for NHibernate.

    http://www.ayende.com/Blog/archive/2007/03/16/Linq-for-NHibernate.aspx

     

    If you want to set up a Multi-Tier infrastructure, InterLINQ could probably be a solution for you.

    http://www.codeplex.com/interlinq

     

    Best Regards

    Manuel

    Monday, November 19, 2007 1:47 PM
  • See also this project: http://code2code.net/DB_Linq/
    Monday, November 19, 2007 2:41 PM
  • Another approach is to use the Entity Framework (aka Linq to Entities) and the EF-enabled MySql ado.net provider.  The final release of this provider is not yet available, but there was a version for beta 2 of the EF, and I expect there will be a version for beta 3 when it comes out shortly.

     

    - Danny

     

    Monday, November 19, 2007 4:04 PM
  • Thanks   Fabric

     

    It seems that this project is under development.

     

    I need a fast solution for this.

     

    could you please put a light on this.

     

    Regards

    Gunwant

     

     

    Wednesday, November 21, 2007 1:50 PM
  • I haven't heard about another solution for MySQL.
    Wednesday, November 21, 2007 4:01 PM
  •  

    Hi Fabric,

     

    I need little more elaboration on this topic.

    My development is largly depend on the use of LINQ.

    I want to specificaly , can i use the db_linq product on my production envoirnment.

     

    Please suggest.

     

    Regards

    Gunwant

    Friday, November 23, 2007 11:18 AM
  • You should contact directly the author of the project, because I don't know much about it.
    Tuesday, November 27, 2007 9:54 AM
  • Mindscape LightSpeed 2.0 also provides an abstraction that means you can use LINQ style querying to access data from your MySQL databases. There is also rich domain modeling integration into Visual Studio 2008.

    Not only is there support for LINQ to MySQL but also LINQ to PostgreSQL, LINQ to SQLite, LINQ to Oracle and, of course, LINQ to SqlServer.

    There is a free version available for people working with small databases.

    You can get more information here: http://www.mindscape.co.nz/products/lightspeed/

    Disclaimer: I do work for Mindscape and randomly found this thread so I'm adding my 2 cents :-)

    John-Daniel Trask
    Monday, June 9, 2008 3:35 AM
  • Why not try ALinq ? the bestest database linq provider! It supports MySQL, Oracle, Access, SQLite, Firebird database.
    for more infomation about alinq, please visit http://www.alinq.org .
    Tuesday, July 14, 2009 11:25 AM
  • Yes, BUT you need to add 3rd party tools to Visual Studio like, "dotConnect for MySQL":

    dotConnect

    There are other tools as well.

    I use a linq to sql (MSSQL) on my site <snip> instead of using mySQL, because I can do all the work on VS (no need for 3rd party software).

    Monday, March 15, 2010 4:57 PM
  • Quick and easy solution for MySql in VS.Net 2010:

    - install MySQL Connector/Net (from: http://dev.mysql.com/downloads/connector/net/6.0.html)
    - add reference to MySql.Data
    - use the built-in ADO.Net Entity Data Model in Visual studio

    to know which version of mysql/connector/.net is supported:
    http://dev.mysql.com/doc/refman/5.1/en/connector-net-versions.html

    • Proposed as answer by pat_vrs Wednesday, January 19, 2011 6:47 PM
    Wednesday, January 19, 2011 6:47 PM
  • i did all 3 steps, what is the next thing to do?
    Thursday, January 20, 2011 11:05 AM
  • Create an instance of your entity model.. and use LINQ to query tables..

    TestEntities oTestEntities = new TestEntities();
    var q = from t in oTestEntities.MyTable select t;
    MessageBox.Show(q.Count().ToString());

    Thursday, January 20, 2011 4:30 PM
  • Try to use 3-rd parties. For example, Devart LinqConnect offers you a nice L2S engine for MySQL.
    Ramesh
    Tuesday, February 22, 2011 2:10 PM