[英]Entity Framework Core DB first, How to add an entity association in different C# core projects
[英]how to add a new table to an existing db in web api c# entity core 2.14
我想向現有的 mdf db 文件添加一個新表。 該項目是實體核心版本 2.14。 (C# web api) 如何添加表並使用新實體更新模型文件夾任何想法?
這個問題太籠統了。 請查看有關遷移的 EF 核心文檔。 https://docs.microsoft.com/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli
Entity Framework Core 為這種變化做好了准備。
為了使其更快更容易,我強烈建議您使用“EF Core Power Tools”。 使用數據庫管理工具直接將新表添加到數據庫中。 在此之后,使用 EF Core Power Tools 的逆向工程選項來獲取新的 EF 代碼優先代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.