• What's new in EF Core 6

    I’m compiling information for our next Adelaide .NET User Group meetup which is focusing on the launch of .NET 6 and Visual Studio 2022.

    EF Core 6 is the next version of Entity Framework - aka Entity Framework Core 6. Don’t confuse this with the old ‘Entity Framework 6’ (the one you might have used with legacy .NET Framework applications)!

    In January 2021, the major themes planned for Entity Framework Core 6 were outlined:

    • Highly requested features
    • Performance
    • Migrations and deployment
    • Improve existing features and fix bugs
    • .NET integration
    • Experiments and investigations

    The blog post went into a bit more detail under each of these headings as to what each might entail.

    In addition, the plan for Entity Framework Core 6.0 is also published on Microsoft Docs.

    Preview 1

    • UnicodeAttribute
    • PrecisionAttribute
    • EntityTypeConfigurationAttribute
    • Translate ToString on SQLite
    • EF.Functions.Random
    • Support for SQL Server sparse columns
    • In-memory database: validate required properties are not null
    • Improved SQL Server translation for IsNullOrWhitespace
    • Database comments are scaffolded to code comments
    • Microsoft.Data.Sqlite
      • Savepoints API
      • Command timeout in the connection string

    Preview 2

    • Preserve synchronization context in SaveChangesAsync
    • Translate String.Concat with multiple arguments
    • Smoother integration with System.Linq.Async
    • More flexible free-text search

    Preview 3

    No blog post for this release. See GitHub issue list for actual changes included.

    Preview 4

    • The runtime perf push
    • Pooling and recycling, DbContext and beyond
    • Logging suppression
    • Opting out of thread-safety checks

    Preview 5

    • Compiled models dramatically reduce startup time for your application
    • The models are generated (similar to how migrations are) so they should be refreshed whenever your model changes.
    • Some features are not currently supported by compiled models, so be aware of the limitations when you try them out.

    Preview 6

    • Support for 64-bit identity seed values
    • Support for new BCL DateOnly and TimeOnly structs for SQLite
    • Uniquify and validate check constraint names
    • Pre-convention model configuration
    • The items on this list

    Preview 7

    • Migration bundles - The migration bundle is a self-contained executable with everything needed to run a migration

    There was also an additional post highlighting improvements to the Azure Cosmos DB Provider.

    Release Candidate 1

    • EF Core 6.0 supports creating and modifying temporal tables mapped to entity types

  • What's new in ASP.NET Core 6

    I’m compiling information for our next Adelaide .NET User Group meetup which is focusing on the launch of .NET 6 and Visual Studio 2022.

    Way back in February 2021, the major themes were outlined for ASP.NET Core in .NET 6. They were:

    • Hot reload: Quickly make UI and code updates to running apps without losing app state for faster and more productive developer experience.
    • Micro APIs: Simplify building API endpoints with much less code and ceremony.
    • Single-file publishing: Build small, standalone, high-performance apps and services.
    • WebAssembly ahead-of-time (AoT) compilation: Compile .NET code in Blazor WebAssembly apps directly to WebAssembly when publishing for significantly improved runtime performance.
    • Updated single-page app (SPA) support Update SPA integration in ASP.NET Core to work seamlessly with the latest modern front-end JavaScript frameworks.
    • Blazor hybrid desktop apps: Combine the best of Blazor and .NET Multi-platform App UI to build cross-platform hybrid desktop apps.
    • HTTP/3: Add support for HTTP/3 and QUIC in ASP.NET Core supported servers.

    Each preview then went on to incrementally work towards these goals:

    Preview 1

    • Support for IAsyncDisposable in MVC
    • DynamicComponent
    • Input ElementReference exposed on relevant components
    • Nullable reference type annotations

    Preview 2

    • Razor compiler updated to use source generators
    • Support for custom event arguments in Blazor
    • CSS isolation for MVC Views and Razor Pages
    • Infer component generic types from ancestor components
    • Preserve pre-rendered state in Blazor apps
    • SignalR – Nullable annotations

    Preview 3

    • Smaller SignalR, Blazor Server, and MessagePack scripts
    • Enable Redis profiling sessions
    • HTTP/3 endpoint TLS configuration
    • Initial .NET Hot Reload support
    • Razor compiler no longer produces a separate Views assembly
    • Shadow-copying in IIS
    • Vcpkg port for SignalR C++ client
    • Reduced memory footprint for idle TLS connections
    • Remove slabs from the SlabMemoryPool
    • BlazorWebView controls for WPF & Windows Forms

    Preview 4

    • Introducing minimal APIs
    • Async streaming
    • HTTP logging middleware
    • Use Kestrel for the default launch profile in new projects
    • IConnectionSocketFeature
    • Improved single-page app (SPA) templates
    • .NET Hot Reload updates
    • Generic type constraints in Razor components
    • Blazor error boundaries
    • Blazor WebAssembly ahead-of-time (AOT) compilation
    • .NET MAUI Blazor apps
    • Other performance improvements

    Preview 5

    • .NET Hot Reload updates for dotnet watch
    • ASP.NET Core SPA templates updated to Angular 11 and React 17
    • Use Razor syntax in SVG foreignObject elements
    • Specify null for Action and RenderFragment component parameters
    • Reduced Blazor WebAssembly download size with runtime relinking
    • Configurable buffer threshold before writing to disk in Json.NET output formatter
    • Subcategories for better filtering of Kestrel logs
    • Faster get and set for HTTP headers
    • Configurable unconsumed incoming buffer size for IIS

    Preview 6

    • Improved Blazor accessibility
    • Required Blazor component parameters
    • Efficient byte array transfers for JavaScript interop
    • Optional parameters for view component tag helpers
    • Angular template updated to Angular 12
    • OpenAPI support for minimal APIs
    • Inject services into minimal APIs without [FromServices] attribute
    • Configure the accept socket for Kestrel
    • IHttpActivityFeature
    • Long running activity tag for SignalR connections
    • WebSocket compression
    • SignalR WebSockets TestServer support
    • New OnCheckSlidingExpiration event for controlling cookie renewal
    • ClientCertificateMode.DelayCertificate

    Preview 7

    • Parity with existing experiences for minimal APIs
    • Added IResult implementations for producing common HTTP responses
    • Support Request, Response and User for minimal actions
    • Minimal host and template improvements
    • Supply Blazor component parameters from the query string
    • Replace the current URI in the browser history from Blazor
    • New DynamicComponent.Instance property
    • Blazor streaming interop from JavaScript to .NET
    • Large file upload & faster file uploads with Blazor
    • Modify HTML <head> content from Blazor components
    • Support for the multiple attribute on <select> elements in Blazor
    • Support for HTTP/3 in Kestrel
    • QUIC support moved to the shared framework
    • Allow control over Activity creation
    • Support for non-ASCII characters in Kestrel response headers
    • Add W3CLogger
    • Add authentication expiration option to SignalR

    Release Candidate 1

    • Render Blazor components from JavaScript
    • Blazor custom elements
    • Manipulate the query string from Blazor
    • .NET to JavaScript streaming
    • PageX and PageY in MouseEventArgs
    • Blazor templates updated to set page titles
    • Disabled long-polling transport for Blazor Server
    • Collocate JavaScript files with pages, views, and components
    • JavaScript initializers
    • Customize Blazor WebAssembly packaging
    • Template improvements
    • Minimal API updates
    • Support for Latin1 encoded request headers in HttpSysServer
    • Emit KestrelServerOptions via EventSource event
    • Add timestamps and PID to ASP.NET Core Module logs
    • New DiagnosticSource event for rejected HTTP requests
    • Create a ConnectionContext from an Accept Socket
    • Streamlined HTTP/3 setup
    • Upgrade to Duende Identity Server

    In addition to these regular previews, two other blog posts were published that relate to ASP.NET Core 6:

  • What's new in C# 10

    I’m compiling information for our next Adelaide .NET User Group meetup which is focusing on the launch of .NET 6 and Visual Studio 2022.

    Next up is C# 10.0. There’s a good summary on Microsoft Docs on the What’s new in C# 10.0 page. At the time of writing that page was still being updated, with the progress of documenting all features being tracked here.

    Also refer to https://github.com/dotnet/roslyn/blob/main/docs/Language%20Feature%20Status.md for features implemented in Roslyn.

    Other features still to be documented include:

    These are also on the list to be documented, but I believe will be only available under a preview flag: