Learn Entity Framework by example
New in EF8
Configuring model
- Primitive collection properties without converters
Entity Framework 8 introduces native support for primitive collection properties e.g. lists and arrays. Custom converters are no longer required.
Contains 2 example queries
- Value objects using Complex types
Complex type objects are not identified or tracked by key, and can be shared by multiple properties
Contains 2 example queries
Model
- Simple modeling with POCO classes
Using simple POCO classes, Entity Framework can construct a relational model for our database
- Modeling with modern C# features (constructors, properties)
Instead of using simple POCO classes, Entity Framework can work with C# features like constructors and private properties
- Use private fields within your model
Entity Framework can map private fields in your context
- Change database schema for all entities
Default schema is dbo, but it can be changed to any other value