markus / packages / EntityFramework.4.3.1 / tools / EF4.3on.NET4.5Readme.txt @ 0c997b99
이력 | 보기 | 이력해설 | 다운로드 (2.29 KB)
1 |
----------------------------------------------------------------------------------------- |
---|---|
2 |
Entity Framework 5 Recommended for .NET Framework 4.5 Projects |
3 |
----------------------------------------------------------------------------------------- |
4 |
|
5 |
|
6 |
You have installed EF 4.3 in a project that targets .NET Framework 4.5. |
7 |
|
8 |
There are some known issues using EF 4.x in a .NET 4.5 project. |
9 |
|
10 |
|
11 |
We recommend installing a pre-release version of EF 5, which is designed to work with .NET 4.5 |
12 |
|
13 |
1) Open package manager console |
14 |
Tools -> Library Package Manager -> Package Manager Console |
15 |
|
16 |
2) Use the following command to install the latest pre-release package |
17 |
Install-Package EntityFramework -IncludePreRelease |
18 |
|
19 |
|
20 |
|
21 |
----------------------------------------------------------------------------------------- |
22 |
Known Issues with Entity Framework 4.x and .NET Framework 4.5 |
23 |
----------------------------------------------------------------------------------------- |
24 |
|
25 |
Entity Framework 4.1 thru 4.3 included additional data annotations in the |
26 |
System.ComponentModel.DataAnnotations namespace in the EntityFramework assembly. |
27 |
In .NET 4.5 these annotations were moved to be part of the .NET Framework in the |
28 |
System.ComponentModel.DataAnnotations.Schema namespace of the |
29 |
System.ComponentModel.DataAnnotations.dll assembly. If you are using EF 4.x and targeting |
30 |
.NET 4.5 this results in two data annotations with the same name in different assemblies. |
31 |
Because the annotations in the .NET Framework are in a different namespace we were not |
32 |
able to use type forwarding to avoid this conflict. |
33 |
|
34 |
It is possible to use EF 4.x on .NET 4.5 but we recommend using the latest pre-release |
35 |
version of EF 5. If you are not using the affected data annotations there is no impact |
36 |
on your code. If you are using the data annotations in a C# project you can use the extern |
37 |
modifier to ensure your code uses the annotations from EntityFramework.dll |
38 |
(http://msdn.microsoft.com/en-us/library/e59b22c5(v=VS.80).aspx). If you use the new |
39 |
annotations from the System.ComponentModel.DataAnnotations.dll assembly in .NET 4.5 |
40 |
they will not be processed by Code First. |
41 |
|
42 |
The affected annotations are: |
43 |
- Column |
44 |
- ComplexType |
45 |
- DatabaseGenerated |
46 |
- DatabaseGeneratedOption |
47 |
- ForeignKey |
48 |
- InverseProperty |
49 |
- MaxLength |
50 |
- MinLength |
51 |
- NotMapped |
52 |
- Table |