如何用Asp.net core3.0 web api迁移功能Migrations

本篇内容主要讲解“如何用Asp.net core3.0 web api迁移功能Migrations”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“如何用Asp.net core3.0 web api迁移功能Migrations”吧!

  1. EF 需要安装Microsoft.EntityFrameworkCore.Tools 插件 如何用Asp.net core3.0 web api迁移功能Migrations 2.打开程序控制台 如何用Asp.net core3.0 web api迁移功能Migrations

  2. 安装命令

    Add-migration  InitialMigration


    程序帮助完成编译和执行

  3. 通过实体类生产数据库表

Update-Database

如何用Asp.net core3.0 web api迁移功能Migrations

如何用Asp.net core3.0 web api迁移功能Migrations

到此,相信大家对“如何用Asp.net core3.0 web api迁移功能Migrations”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!