日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Entity Framework Core生成的存储过程在MySQL中需要进行处理及PMC中的常用命令

發(fā)布時間:2023/12/4 数据库 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Entity Framework Core生成的存储过程在MySQL中需要进行处理及PMC中的常用命令 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

在使用Entity Framework Core生成MySQL數(shù)據(jù)庫腳本,對于生成的存儲過程,在執(zhí)行的過程中出現(xiàn)錯誤,需要在存儲過程前面添加

delimiter //

附:可以使用Visual Studio中的程序包管理器控制臺執(zhí)行Entity Framework Core中的遷移命令。

PMC CommandUsage
Get-Help entityframework顯示有關(guān)實體框架命令的信息。
Add-migraion <migration name>通過添加遷移快照來創(chuàng)建遷移。
Remove-Migration刪除最后一個遷移快照。
Update-Database根據(jù)上一個遷移快照更新數(shù)據(jù)庫架構(gòu)。
Script-Migration使用所有遷移快照生成SQL腳本。
Scaffold-DbContext為指定的數(shù)據(jù)庫生成DbContext和實體類型類。這稱為逆向工程。
Get-DbContext獲取有關(guān)DbContext類型的信息。
Drop-Database刪除數(shù)據(jù)庫。

命令詳解:

Get-Help PM> get-help entityframework _/\__ ---==/ \\ ___ ___ |. \|\ | __|| __| | ) \\\ | _| | _| \_/ | //|\\ |___||_| / \\\/\\ TOPIC about_EntityFrameworkCore SHORT DESCRIPTION Provides information about the Entity Framework Core Package Manager Console Tools. LONG DESCRIPTION This topic describes the Entity Framework Core Package Manager Console Tools. See https://docs.efproject.net for information on Entity Framework Core. The following Entity Framework Core commands are available. Cmdlet Description -------------------------- --------------------------------------------------- Add-Migration Adds a new migration. Drop-Database Drops the database. Get-DbContext Gets information about a DbContext type. Remove-Migration Removes the last migration. Scaffold-DbContext Scaffolds a DbContext and entity types for a database. Script-Migration Generates a SQL script from migrations. Update-Database Updates the database to a specified migration. SEE ALSO Add-Migration Drop-Database Get-DbContext Remove-Migration Scaffold-DbContext Script-Migration Update-Database Add-Migration NAME Add-Migration SYNOPSIS Adds a new migration. SYNTAX Add-Migration [-Name] <String> [-OutputDir <String>] [-Context <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] DESCRIPTION Adds a new migration. REMARKS To see the examples, type: "get-help Add-Migration -examples". For more information, type: "get-help Add-Migration -detailed". For technical information, type: "get-help Add-Migration -full". Remove-Migration NAME Remove-Migration SYNOPSIS Removes the last migration. SYNTAX Remove-Migration [-Force] [-Context <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] DESCRIPTION Removes the last migration. RELATED LINKS Add-Migration about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Remove-Migration -examples". For more information, type: "get-help Remove-Migration -detailed". For technical information, type: "get-help Remove-Migration -full". Update-Database NAME Update-Database SYNOPSIS Updates the database to a specified migration. SYNTAX Update-Database [[-Migration] <String>] [-Context <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] DESCRIPTION Updates the database to a specified migration. RELATED LINKS Script-Migration about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Update-Database -examples". For more information, type: "get-help Update-Database -detailed". For technical information, type: "get-help Update-Database -full". Script-migration NAME Script-Migration SYNOPSIS Generates a SQL script from migrations. SYNTAX Script-Migration [-From] <String> [-To] <String> [-Idempotent] [-Output <String>] [-Context <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] Script-Migration [[-From] <String>] [-Idempotent] [-Output <String>] [-Context <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] DESCRIPTION Generates a SQL script from migrations. RELATED LINKS Update-Database about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Script-Migration -examples". For more information, type: "get-help Script-Migration -detailed". For technical information, type: "get-help Script-Migration -full". scaffold-dbcontext NAME Scaffold-DbContext SYNOPSIS Scaffolds a DbContext and entity types for a database. SYNTAX Scaffold-DbContext [-Connection] <String> [-Provider] <String> [-OutputDir <String>] [-Context <String>] [-Schemas <String[]>] [-Tables <String[]>] [-DataAnnotations] [-Force] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] DESCRIPTION Scaffolds a DbContext and entity types for a database. RELATED LINKS about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Scaffold-DbContext -examples". For more information, type: "get-help Scaffold-DbContext -detailed". For technical information, type: "get-help Scaffold-DbContext -full". Get-DbContext NAME Get-DbContext SYNOPSIS Gets information about a DbContext type. SYNTAX Get-DbContext [-Context <String>] [-Project <String>] [-StartupProject <String>] [<CommonParameters>] DESCRIPTION Gets information about a DbContext type. RELATED LINKS about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Get-DbContext -examples". For more information, type: "get-help Get-DbContext -detailed". For technical information, type: "get-help Get-DbContext -full". Drop-Database NAME Drop-Database SYNOPSIS Drops the database. SYNTAX Drop-Database [-Context <String>] [-Project <String>] [-StartupProject <String>] [-WhatIf] [-Confirm] [<CommonParameters>] DESCRIPTION Drops the database. RELATED LINKS Update-Database about_EntityFrameworkCore REMARKS To see the examples, type: "get-help Drop-Database -examples". For more information, type: "get-help Drop-Database -detailed". For technical information, type: "get-help Drop-Database -full".

get-help命令執(zhí)行結(jié)果:分享一個關(guān)于Entity Framework的網(wǎng)站,希望對大家有幫助:https://www.entityframeworktutorial.net/

總結(jié)

以上是生活随笔為你收集整理的Entity Framework Core生成的存储过程在MySQL中需要进行处理及PMC中的常用命令的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。