1 / 19

Entity Framework Core 2.0

Entity Framework Core 2.0. Diego Vega, Andrew Peters @ divega , @ anpete. About today’s session. EF versions & flavors EF Core 2.0 Demos Roadmap. Entity Framework versions & flavors. Entity Framework O/R Mapper for .NET Framework. Entity Framework Core

ocasio
Download Presentation

Entity Framework Core 2.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Entity Framework Core 2.0 Diego Vega, Andrew Peters @divega, @anpete

  2. About today’s session • EF versions & flavors • EF Core 2.0 • Demos • Roadmap

  3. Entity Framework versions & flavors Entity Framework O/R Mapper for .NET Framework Entity Framework Core Lightweight, extensible, cross-platform O/R Mapper for .NET Standard EF 6.2 (released last week) EF Core 2.1 (first half of 2018) EF 6.0 – 6.1.3 (2013 – 2015) EF Core 2.0 (2017) EF 4.1 to 5.0 (2011 – 2012) EF Core 1.0 – 1.1 (2016) EF 4.0 (2010) EF 1.0 (2008)

  4. Performance DbContext pooling Compiled queries Architecture improvements Entity Framework Core 2.0 Themes • Runs everywhere • .NET Standard 2.0 • New features • Query filters • Function mapping • Owned entities • Table splitting

  5. EF Core 2.0 - Compiled Queries Demo

  6. EF Core 2.0 – DbContext pooling Demo

  7. DbContext per Request publicclassBlogsController : Controller { privateBlogContext _context; publicBlogsController(BlogContext context) { _context = context; } publicIActionResult Index() { return _context.Blogs.ToList(); } } DI Container Request: /blogs/index Request: /blogs/index BlogContext Blogs Controller BlogContext Blogs Controller Scope Scope Request: /blogs/index BlogContext Blogs Controller Scope

  8. DbContext Pooling publicclassBlogsController : Controller { privateBlogContext _context; publicBlogsController(BlogContext context) { _context = context; } publicIActionResult Index() { return _context.Blogs.ToList(); } } DI Container Request: /blogs/index Context Pool Scope BlogContext Blogs Controller Scope BlogContext BlogContext BlogContext BlogContext Request: /blogs/index BlogContext BlogContext Blogs Controller Scope Request: /blogs/index BlogContext Blogs Controller Scope

  9. EF Core 2.0 - Query Filters Demo

  10. EF Core 2.0 - Owned Types & Table Splitting Demo

  11. EF Core 2.0 - Function Mapping Demo

  12. EF Core 2.0 – EF.Functions.Like() Demo

  13. EF Core 2.0 - String Interpolation on raw SQL Demo

  14. Lazy loading Value conversions Lifecycle events Non-default constructors Update model from database Column ordering Perf investigation UWP testing EF Core 2.1 – Planned Features • GroupBy • Seeding • View types • Include for derived types • System.Transactions • Cosmos DB provider • Sample Oracle provider • App insights integration

  15. EF Core 2.1 – View types Demo

  16. EF Core 2.1 – Data seeding Demo

  17. EF Core 2.1 – Value convertes and GroupBy translation Demo

  18. References • Demos https://github.com/anpete/efdemos • Project https://github.com/aspnet/EntityFrameworkCore • EF Core docs https://docs.microsoft.com/ef/core • Twitter @divega @anpete @efmagicunicorns • Blog https://blogs.msdn.microsoft.com/dotnet/

  19. Please use EventsXD to fill out a session evaluation. Thank you! Questions?

More Related