EF Core (RC2)
-
Upload
ido-flatow -
Category
Technology
-
view
264 -
download
0
Transcript of EF Core (RC2)
Ido Flatow
Entity Framework Core (EF Core) 1.0
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatowJoin the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
About MeSenior Architect, Sela GroupMicrosoft Regional Director, and an ASP.NET/IIS MVPCo-author of courses and booksFocus on server, web, and cloud
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Entity Framework Project Status
New runtime components on NuGetCore runtime components in .NETTooling in Visual Studio
Runtime in .NET FrameworkTooling in Visual Studio
Runtime on NuGetTooling on Microsoft Download CenterLatest version included in Visual Studio
Entity Framework 3.5 SP1
Entity Framework 4
Entity Framework 4.x
Entity Framework 5
Entity Framework 6.x
Entity Framework 6.2 Entity Framework Core 1.0
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
TodayWritten to target relational databasesEF6.x DLL files are over 5MBRuns only on full .NET FrameworkNo support for batch updates
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
EF Core Key FeaturesRewritten from the ground up to be lightweight (under 1MB)New platforms & data storesIoC friendly and extensibleOptimized query generationCode-First onlyBatching
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
.NET FRAMEWORK .NET CORE XAMARINAP
PM
ODEL
SBA
SELI
BRAR
IES
Base Class Library Core Library Mono Class Library
ASP.NET
Windows FormsWPF UWP
ASP.NET Core
iOSAndroid
Compilers Languages Runtime components
COMMON INFRASTRUCTURE
OS X
New Platforms
EF6.x EF Core
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
New Data StoresRelational & non-relational
Not a magic abstractionHigh level services that are useful on all/most storesNon-common concerns handled by provider extensions
Example providersRelational (SQL Server, SQLite, Postgres, SQL Compact etc.)In Memory (for testing)Azure Table StorageRedis cache
Just relational providers for v1.0
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Lightweight & Extensible CoreSame top level experience as EF6.x
Still DbContext/DbSet etc.New core
Core = metadata, change tracking, query pipeline, etc.Built as a collection of services with dependency injectionEasier to replace/extend servicesReplace confusing APIs & behavior
Optimized for memory and CPU usagePay-per-play components
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
EF6.x – The End?!Will continue to be a supported releaseMicrosoft will continue with bug fixes and small improvements to the code baseFirst preview of EF6.2 will be available shortly after EF Core reaches RTM
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Some New FeaturesMixed C#/database eval in LINQ queriesBatch saveSQL query improvementsShadow state propertiesAlternate keysTrackGraph API
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
EF Core Basics
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
LINQ and SQL Query Improvements
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Simplified Metadata API
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Extensible Core
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
New Data Stores
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
New Features
Demo
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
New Platforms
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
EF Core 1.0 Feature Status (condensed version)Backlog
Lazy loadingComplex value typesStored procedure mappingData seedingUpdate model from databaseMany-to-many relationships without a join entityInheritance mapping with TPT and TPCCommand interception
In ProgressBug fixingPerformance improvementsLINQ improvementsDocumentation and Intellisense
Thrown outEDMXEntity SQLObjectContext API
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
EF Core & EF6.xEF6.x will be the right choice for many applicationsCarefully evaluate requirements if considering EF Core
Some important features not implemented in 1.0 (e.g. lazy loading, stored procedure mapping, etc.)Less mature code base (e.g. LINQ translator has limitations)
EF6.x to EF Core is “port” not “upgrade”Very basic code will port easilyMany APIs have changed drasticallyBeware of behavior differences in similarly named APIs
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
When to Use EF Core?New applications that do not need the features that are not yet implemented in EF Core
Applications that target .NET Core, such as Universal Windows Platform (UWP) and ASP.NET Core applications
Join the conversation on Twitter: #ndcoslo // @NDC_Conferences // @idoFlatow
Next StepsDocumentation
docs.efproject.netgithub.com/aspnet/EntityFramework/wiki/Roadmap
Repositoriesgithub.com/aspnet/EntityFrameworkgithub.com/rowanmiller/Demo-EFCore
Blogsblogs.msdn.microsoft.com/dotnetblogs.msdn.com/b/adonet (older)
My demo codegit.io/voYzr