Setting up a localdb on a Mac using Visual Studio Code

entity-framework-core localdb macos mariadb visual-studio-code

Question

I'm trying to set up a local database on my Mac using VS Code for development purposes. I have installed MariaDB via homebrew, and I can access it through the terminal and play around with it.

But how do I get the connection-string to put in to VS Code, so when I'm using Entity Framework Core, it will automatically create the tables in the MariaDB database?

1
0
9/10/2019 4:17:23 PM

Popular Answer

Check the DB provider in : https://docs.microsoft.com/en-us/ef/core/providers/?tabs=dotnet-core-cli

It mention the MariaDB connector as the same as MySQL, using Pomelo.EntityFrameworkCore.MySql, available in Nuget

you can start a project and then add :

dotnet add package Pomelo.EntityFrameworkCore.MySql

Like described in this pretty straight forward tutorial :

https://www.jerriepelser.com/blog/using-mariadb-with-aspnet-core/

Have fun

0
12/2/2019 7:01:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow