{"id":811,"date":"2020-06-24T10:14:48","date_gmt":"2020-06-24T07:14:48","guid":{"rendered":"http:\/\/localhost\/bilisimkurdu\/?p=811"},"modified":"2020-06-24T10:14:48","modified_gmt":"2020-06-24T07:14:48","slug":"net-core-ef-ile-mysql-veritabani-islemleri","status":"publish","type":"post","link":"http:\/\/localhost\/bilisimkurdu\/net-core-ef-ile-mysql-veritabani-islemleri\/","title":{"rendered":".NET Core EF ile MYSQL veritaban\u0131 i\u015flemleri"},"content":{"rendered":"\n
Merhaba Muhterem Ziyaret\u00e7ilerimiz,<\/p>\n\n\n\n
Bu yaz\u0131mda .NET Core projesi \u00fczerinden Entity Framework ile MYSQL veritaban\u0131 ile i\u015flem yapmay\u0131 anlatmaya \u00e7al\u0131\u015faca\u011f\u0131m.<\/p>\n\n\n\n\n\n\n\n
Proje Visual Studio ilr olu\u015fturulmu\u015fsa;<\/p>\n\n\n\n
Visual Studio ile projeyi a\u00e7t\u0131ktan sonra Tools -> NuGet Package Manager -> Package Manager Console a\u015famalar\u0131n\u0131 takip ederek a\u015fa\u011f\u0131daki komutlar\u0131 girerek Entitiy Framework paketleri y\u00fcklenir.<\/p>\n\n\n\n
Install-Package Microsoft.EntityFrameworkCore.Design\nInstall-Package Microsoft.EntityFrameworkCore.Tools<\/code><\/pre>\n\n\n\nE\u011fer Console ile olu\u015fturulmu\u015fsa;<\/p>\n\n\n\n
dotnet add package Microsoft.EntityFrameworkCore.Design\ndotnet add package Microsoft.EntityFrameworkCore.Tools<\/code><\/pre>\n\n\n\n.NET Core versiyonu 3.0’\u0131n alt\u0131ndaysa (<.NET Core 3.0)<\/p>\n\n\n\n
Visual Studio:<\/p>\n\n\n\n
Install-Package Pomelo.EntityFrameworkCore.MySql\n\nScaffold-DbContext \"Server=serverIPorName;Database=databaseName;User=userName;Password=pass;TreatTinyAsBoolean=true\" Pomelo.EntityFrameworkCore.MySql -OutputDir Models-f\n<\/code><\/pre>\n\n\n\nConsole:<\/p>\n\n\n\n
dotnet add package Pomelo.EntityFrameworkCore.MySql\n\ndotnet ef dbcontext scaffold \"Server=serverIPorName;Database=databaseName;User=userName;Password=password;TreatTinyAsBoolean=true;\" \"Pomelo.EntityFrameworkCore.MySql\"\n -o Models -f\n\n\/\/veya\ndotnet add package Pomelo.EntityFrameworkCore.MySql\n\ndotnet ef dbcontext scaffold \"server=serverIPorName;port=3306;user=root;password=mypass;database=database\" Pomelo.EntityFrameworkCore.MySql -o Models -f\n<\/code><\/pre>\n\n\n\n.NET Core 3.0 ve \u00fczeri ise:<\/p>\n\n\n\n
Visual Studio:<\/p>\n\n\n\n
Install-Package MySql.Data.EntityFrameworkCore\n\nScaffold-DbContext \"server=serverIPorAdress;port=3306;user=userName;password=mypass;database=databaseName\" MySql.Data.EntityFrameworkCore -OutputDir Models -f<\/code><\/pre>\n\n\n\nConsole:<\/p>\n\n\n\n
dotnet add package MySql.Data.EntityFrameworkCore\n\ndotnet ef dbcontext scaffold \"server=serverIPorAdress;port=3306;user=userName;password=mypass;database=databaseName\" MySql.Data.EntityFrameworkCore -o Models -f<\/code><\/pre>\n\n\n\nkomutlar\u0131 girilerek gerekli paketler y\u00fcklenip ba\u011flant\u0131 sa\u011flan\u0131r.<\/p>\n\n\n\n
Sorgu i\u015flemleri i\u00e7in a\u015fa\u011f\u0131daki linkleri inceleyebilirsiniz.<\/p>\n\n\n\n