5 02 2018
New killer features planned for .NET Core, ASP.NET Core and Entity Framework Core 2.1
Microsoft announced roadmap for upcoming release of .NET Core family versioned as .NET Core 2.1. While there are some new features and many improvements coming I compiled a list of my favorites that I see as most imortant to all developers building solutions on .NET Core, ASP.NET Core and Entity Framework Core.
.NET Core 2.1
- Build-time performance – in next version the build-time performance will be way better and specially for incremental builds. The change is made to dotnet build command and MSBuild.
- Span<T>, Memory<T> – new family of classes to use arrays and other types of memory in more effective ways. Instead of making copy of slice of array to use selection of elements these classes allow to operate directly on arrays without time or space cost. For Span<T> there is also no allocation cost as it is a struct.
Read more from .NET Blog post .NET Core 2.1 Roadmap.
ASP.NET Core 2.1
- Functional testing infrastructure – enables better end-to-end handling of requests including routes, filters, controllers, actions, views and pages. There will be test fixture implementation that helps to get over of current pitfalls.
- Partial tag helper – new partial tag helper makes rendering of partials straightforward and elegant. Model can be specified using model expression syntax. Tag helper takes also care of generating correct prefixes for model fields.
- Razor UI in class library – new Razor SDK allows us to build Razor files into class library that can be shared as a NuGet package. It makes also start time of web application faster. Fast updates to views and pages are still allowed at runtime as application can automatically discover and override these.
- SignalR – finally there will be SignalR implementations for ASP.NET Core. Besides the one developed with ASP.NET Core, Microsoft will also port current ASP.NET SignalR implementation to ASP.NET Core. Whatever is the end result I am happy as coding directly against WebSocket is not much fun.
- WebHooks – a set of ASP.NET WebHooks is made available for ASP.NET Core. The following receivers are planned to make work on ASP.NET Core: Azure alerts, Azure Kudu notifications, Dynamics CRM, Bitbucket, Dropbox, GitHub, MailChimp, Pusher, Salesforce, Slack, Stripe, Trello, WordPress. For WebHooks there will be special attribute available for controller actions that specify which type of hook the action can handle.
- Virtual authentication schemes – long story short: virtual authentication schemes make it easier to mix authentication schemes in same web application. Example: we can use bearer-token authentication for URL-s starting with /api and cookie authentication otherwise.
- Identity as a library – Identity UI will be provided as a separate library to make it easier to start using Identity in existing applications. If all identity-related code must be in application like now then new identity scaffolder can be used for this.
Read more from .NET Web Development and Tools Blog post ASP.NET Core 2.1 roadmap.
Entity Framework Core 2.1
- Lazy loading – building blocks for lazy loading ar coming and for this there will be new package Microsoft.EntityFrameworkCore.Proxies. Lazy loaded members must be defined as virtual.
- LINQ GroupBy translation – this far GroupBy LINQ operator is always evaluated in memory. From Entity Framework Core 2.1 it will change and in most cases GroupBy is translated to SQL clause.
- Query types – new types in Entity Framework Core models that doesn’t need keys to be defined. These types can be used with tables and views that have no keys. Also these types can be used with FromSql() queries.
- Include for derived types – it was painful to let Entity Framework Core to load navigation properties of derived types this far. From next version subtypes will be supported in Include() methods.
- Cosmos DB provider preview – the first document database that Microsoft supports on Entity Framework Core. Current plan is to release the early preview within 2.1 timeframe.
Read more from .NET Blog post Entity Framework Core 2.1 Roadmap.