簡體   English   中英

如何使用 ef 核心處理多個遷移提供者(SQLite、AzureSQL)?

[英]How to handle multiple migrationproviders(SQLite, AzureSQL) with ef core?

嘗試創建具有數據庫訪問權限的 .NET Core 3.0(通用主機)應用程序並將其部署到 Azure 應用程序服務。 As indicated by examples in official Microsoft Documentation, you can use SQLite DB for local development and Azure SQL for production when deployed to Azure App Service.

Problems I get are related to migrations, local migrations for SQLite works fine, but these SQLite migrations doesn't seem to be fully compatible with Azure SQL so SQLDB creation fails when deploying to Azure and trying to apply the migrations from local SQLite.

當您喜歡將本地數據庫用於開發而另一個(Azure SQLDb)用於生產時,推薦的處理這種情況的方法是什么?

我在 macOS 上使用 VSCode 作為我的開發環境。

您應該直接針對 Azure 或 Azure 堆棧 SQL 數據庫進行開發,也許在您自己的開發人員訂閱中,如果您是數據遷移訂閱者,則可以使用 VS 遷移訂閱者解決(或解決)

https://www.microsoft.com/en-us/download/details.aspx?id=53595

編輯:這需要一台 Windows 機器。

暫無
暫無

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

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