前提・実現したいこと
ASP.NET MVC core2.0のWebApplicationで、Postgresサーバーからのデータベースファーストで、Modelをつくりたいです。 Windows7 Pro Visual Studio 2017 Pro Power Shell 3.0 です。 データベースは作成済みです。pgAdmin 4などを使ってアクセスできるほか、全部手動で作ったASP.NETのWebApplicationでも動作しています。 今後の勉強とバージョンアップのため、Database Firstのコード作成方法を知りたいです。
試したこと
(1)新規にプロジェクトを作りました。ASP.NET Core Webアプリケーション (2)認証の変更で個別のユーザーアカウント。アプリ内のストアユーザーアカウントを選択。 (3)NuGetでNpgsql3.2.7をインストール。 (4)Power Shellでcd C:\Users\User\source\repos\WebApplicaiton1\WebApplicaiton1 (5)Power Shellでdotnet ef dbcontext scaffold "Server="servername;Port=5432;Database=databasename;User ID=postgres;Password=password;" Npgsql.EntityFrameworkCore.PostgreSQL -o Models -f (6)プロンプトが>>に変わる。フリーズ? という状況です。 アドバイスいただければ幸いです。
発生している問題・エラーメッセージ
(6)プロンプトが>>に変わる。フリーズ?
該当のソースコード
PowerShell
1dotnet ef dbcontext scaffold "Server="servername;Port=5432;Database=databasename;User ID=postgres;Password=password;" Npgsql.EntityFrameworkCore.PostgreSQL -o Models -f
【追記】
Postgres の使用は必須の要件です。SQL Serverでは動かしたことがあります。
.NETでもOKです。
EDM を作って Linq to Entities が使えるところまでの情報が分かればよいです。
補足情報(FW/ツールのバージョンなど)
Windows7 Pro Visual Studio 2017 Professional 15.6.7 Power Shell 3.0
あなたの回答
tips
プレビュー