Tony Daskalo
Tony Daskalo

Reputation: 23

Is it possible to use Mysql in a visual studio project with linq syntax?

In an attempt to add a DB to my visual studio Project I chose mysql and got a little confused in the process of adding the db. after three days of research with trial and error I ended up downloading the /net mysql connector and mysql for visual studio. I was able to set up a connection to the db and even perform some queries using a string in a MySqlCommand type (e.g. MySqlCommand cmd = new MySqlCommand("select * from jobs") )

my ultimate objective though is using linq syntax for the queries , is that possible? and if so,is there a simple guide or a code example? (tried looking for one myself with little to no success)

Upvotes: 1

Views: 2218

Answers (1)

Kinyanjui Kamau
Kinyanjui Kamau

Reputation: 1936

It is possible and what I use for most of my work. Like Habib has commented, you need to use MySQL with Entity Framework. See this article.

Upvotes: 1

Related Questions