Difference between revisions of "Entity Framework"
(Created page with "==Full Title== This wiki page is about the Microsoft ORM called Entity Framework including best practices and troubleshooting on ASP.NET. ==Context== The context is a ASP...")
|(3 intermediate revisions by the same user not shown)|
|Line 9:||Line 9:|
[[Category: Best ]]
Latest revision as of 12:58, 24 June 2021
This wiki page is about the Microsoft ORM called Entity Framework including best practices and troubleshooting on ASP.NET.
The context is a ASP.NET Core package version 5 or up that is deployed as a complete package.
Entity Framework assumes a configuration which makes it easy to get running, but hard to adapt to other environments.
- The entity type 'Access' requires a primary key to be defined. If you intended to use a keyless entity type call 'HasNoKey()' is an error that occurs if a POCO class is used in a Dataset table that does not designed to be a db table in its own right. The answer is to mark the POCO class with an [owned] annotation.
- Annotation of a foreign key is described in the blog Data Annotations - ForeignKey Attribute in EF 6 & EF Core.