Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to MySQL from .Net Core [closed]

I am porting and ASP.Net framework / SQL Server application to ASP.Net Core / MySQL.

I am having problems finding documentation which shows how I can interface my existing code which I have ported to .Net Core to a MySQL database.

Has anyone done this ?

Thanks.

like image 683
Hughgo Avatar asked Aug 03 '16 08:08

Hughgo


People also ask

Can you use MySQL with .NET core?

NET Core and MySQL are both free and open source technologies. The new ASP.NET Core can run on Linux and in Linux Containers, and MySQL is one of the easiest databases to get started with. This makes the combination of ASP.NET Core and MySQL a pretty compelling combination.

Does MySQL close connection automatically?

When using something like cgi, it's completely unnecessary to close your mysql connections since they close automatically at the end of script execution.

Where do I close MySQL connection?

To close the connection in mysql database we use php function mysqli_close() which disconnect from database. It require a parameter which is a connection returned by the mysql_connect function. Syntax: mysqli_close(conn);


1 Answers

You can't find any documentation because it doesn't exist. Check here: EF Doc

like image 116
Jakub Solarz Avatar answered Oct 09 '22 03:10

Jakub Solarz