Asp.Core Database First Generate Entity Classes
Asp.net Core projenizde mevcut veritabanınızın entity classlarını oluşturmak için package.json dosyasına
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
"Microsoft.EntityFrameworkCore.SqlServer.Design": "1.0.0",
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
}
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final"
}
ekledikten sonra, Package Manager Console'da aşağıdaki komutu kendi veritabanı bilgilerinizle değiştirerek çalıştırın.
Scaffold-DbContext "server=94.73.xx.yy;database= veritabaniAdi;User Id= testUser ;Password= xyzPwd ; TrustServerCertificate=False;" Microsoft.EntityFrameworkCore.SqlServer
Yorumlar
Yorum Gönder