Các Lệnh Cơ Bản Về Migration Trong .NET Core

 9/7/2019 |  Admin   5818 lượt xem

(netcore.vn) - Những lệnh cơ bản về Migration trong .NET Core

Dưới đây là đoạn code cơ bạn về migration trong Core First của Entity Framework Core (.NET Core)

Tạo migration trong .NET Core

Add-Migration [NameMigration]

Cập nhật migration tới Database

Update-Database

Cập nhật database về migration cũ

Update-Database -Migration [OldNameMigration]

Cảm ơn các bạn đã quan tâm. Nếu có bất cứ phản hồi nào vui lòng comment bên dưới.

liên quan

Làm việc với Stored Procedures trong EF Core và ASP.NET Core  3546

 8/2/2020

Làm việc với Stored Procedures trong EF Core và ASP.NET Core

Xem chi tiết 

Tạo Cascade Delete trong Entity Framework Core  3267

 4/21/2020

Tạo Cascade Delete trong Entity Framework Core

Xem chi tiết 

Ra mắt Entity Framework Core 5 preview 2  2848

 4/4/2020

Ra mắt Entity Framework Core 5 preview 2

Xem chi tiết 

Lỗi The Include operation for navigation is unnecessary and was ignored because the navigation is not reachable in the final query results trong FE Core  2541

 11/1/2019

Lỗi The Include operation for navigation is unnecessary and was ignored because the navigation is not reachable in the final query results trong FE Core

Xem chi tiết 

Lỗi The LINQ expression could not be translated and will be evaluated locally trong EF Core  2384

 11/1/2019

Lỗi The LINQ expression could not be translated and will be evaluated locally trong EF Core

Xem chi tiết 

Entity Framework Core  4434

 9/3/2019

Entity Framework Core

Xem chi tiết 
Like Fanpage Để Ủng Hộ Chúng Tôi Duy Trì Website