簡體   English   中英

如何為 SQLite 創建身份服務器數據庫?

[英]How to create Identity Server DB for SQLite?

我已經運行dotnet new is4ef來創建身份服務器模板。

接下來,我在Startup.cs中更改了UseSqlServer() -> UseSqlite()

程序編譯,但運行時未創建數據庫中的表。

如何為配置存儲和操作存儲創建合適的表?

要創建數據庫,您需要運行遷移:

dotnet tool install --global dotnet-ef
dotnet ef migrations add 'initial' --project src/IdentityServer/IdentityServer.csproj --context PersistedGrantDbContext

然后你更新數據庫

dotnet ef database update --project src/IdentityServer/IdentityServer.csproj --context ConfigurationDbContext

然后創建數據庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM