Entity Framework 7:New features and changes

11
1 Entity Framework 7: New features and changes Manfred Steyer Books Folie 2

Transcript of Entity Framework 7:New features and changes

Page 1: Entity Framework 7:New features and changes

1

Entity Framework 7:New features and changes

Manfred Steyer

Books

Folie 2

Page 2: Entity Framework 7:New features and changes

2

Contents

Entity Framework Today

Current Influences

Entity Framework Tomorrow

DEMO

Conclusion

Folie 3

ENTITY FRAMEWORK TODAY

Page 4

Page 3: Entity Framework 7:New features and changes

3

EF 6.x

Folie 6

O/R-MapperMature

(since 2008)Optimized

Ecosystem Integration

Recommended LINQ

Modes of Operation

Folie 7

• Model First

• DB First

Mapping via XML

• Code First

• Code First with Reverse Engineering

Mapping via Code

Page 4: Entity Framework 7:New features and changes

4

Code First brings several advantages

Folie 8

Reverse Engineering

Source ControlMore Intuitive for

Developers

More Freedom for Developers

Code-basedConfiguration

Conventions

Migrations

DbContext

Object Model

Folie 9

ObjectContext

Page 5: Entity Framework 7:New features and changes

5

CURRENT INFLUENCES

Page 10

Current Influences

Folie 11

Page 6: Entity Framework 7:New features and changes

6

ENTITY FRAMEWORK TOMORROW

Page 12

Goals

Reach

• .NET Core

• NoSQL

Tity up

• Focus: Code First

• RIP ObjectContext

Folie 13

Page 7: Entity Framework 7:New features and changes

7

Non-Goals

Folie 14

• Yes, but only when itreally makes sense

API-Changes

• NoSQL != RDBMSAbstract

Paradigms

Migration

You have to modify existing code

Don't do it now!

Current Version 6.x will stay

Page 8: Entity Framework 7:New features and changes

8

Feature Set now

Folie 16

EF 6

EF 7

EF 6 is still the recommended version!

Feature Set in Future

Folie 17

EF 6

EF 7.x+

Page 9: Entity Framework 7:New features and changes

9

Some Limitations in 7.0

M:N-Relations

Model it with two 1:N

Lazy Loading

Just TPH-Inheritance

Complex Types

Custom Conventions

Mappings to Stored Procedures

Update Model from Database

Non-relational Providers

Some new Features

Handling of detached Entities

Improvements for Eager-Loading and Batching

Client-Evaluation and Raw SQL

Shadow State

Alternate Keys

Linux, Universal-Apps

PostgreSQL, SQLite

Folie 19

Page 10: Entity Framework 7:New features and changes

10

7.0 or 6.x

Web with.NET Core

EF 7.0

Universal Apps

EF 7.0

ElseEF 6.x

Code Frist

DEMO

Page 21

Page 11: Entity Framework 7:New features and changes

11

Conclusion

Version 7: Spring-Cleaning

Getting rid of Legacy

One Mode of Operation: "Code First"

Time seems to be fitting: .NET Core

Increasing Reach:

NoSQL, Linux, Universal-Apps (.NET Core)

Providers for SQL Server, PostgreSQL, SQLite

New features, like Batching or Shadow Properties

EF 6.x is still recommended

Folie 22

[email protected]

SOFTWAREarchitekt.at

ManfredSteyer

Contact