EntityFrameworkCore自动生成实体的坑

dotnet ef dbcontext scaffold "Host=localhost;Database=skywind_structure;Username=postgres;Password=123456" Npgsql.EntityFrameworkCore.PostgreSQL -d -f -o Models --project "C:\Users\RF\source\Repos\EY.Skwyind.Server.Core\EY.Skwyind.Server.Core\EY.Skwyind.Server.Core.csproj"

Scaffold-DbContext "Data Source=DESKTOP-0A4ECCK;Initial Catalog=northwind;User=sa;Password=123456;Encrypt=True;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

必须默认项目是网站,不能是类库

posted @ 2020-10-21 15:29  任锋  阅读(263)  评论(0编辑  收藏  举报