提交 | 用户 | 时间
|
e46d3b
|
1 |
TOPIC |
懒 |
2 |
about_EntityFramework |
|
3 |
|
|
4 |
SHORT DESCRIPTION |
|
5 |
Provides information about Entity Framework commands. |
|
6 |
|
|
7 |
LONG DESCRIPTION |
|
8 |
This topic describes the Entity Framework commands. Entity Framework is |
|
9 |
Microsoft's recommended data access technology for new applications. |
|
10 |
|
|
11 |
The following Entity Framework cmdlets are used with Entity Framework |
|
12 |
Migrations. |
|
13 |
|
|
14 |
Cmdlet Description |
|
15 |
----------------- --------------------------------------------------- |
|
16 |
Enable-Migrations Enables Code First Migrations in a project. |
|
17 |
|
|
18 |
Add-Migration Scaffolds a migration script for any pending model |
|
19 |
changes. |
|
20 |
|
|
21 |
Update-Database Applies any pending migrations to the database. |
|
22 |
|
|
23 |
Get-Migrations Displays the migrations that have been applied to |
|
24 |
the target database. |
|
25 |
|
|
26 |
The following Entity Framework cmdlets are used by NuGet packages that |
|
27 |
install Entity Framework providers. These commands are not usually used as |
|
28 |
part of normal application development. |
|
29 |
|
|
30 |
Cmdlet Description |
|
31 |
------------------------------ --------------------------------------- |
|
32 |
Add-EFProvider Adds or updates an Entity Framework |
|
33 |
provider entry in the project config |
|
34 |
file. |
|
35 |
|
|
36 |
Add-EFDefaultConnectionFactory Adds or updates an Entity Framework |
|
37 |
default connection factory in the |
|
38 |
project config file. |
|
39 |
|
|
40 |
Initialize-EFConfiguration Initializes the Entity Framework |
|
41 |
section in the project config file and |
|
42 |
sets defaults. |
|
43 |
|
|
44 |
SEE ALSO |
|
45 |
Enable-Migrations |
|
46 |
Add-Migration |
|
47 |
Update-Database |
|
48 |
Get-Migrations |