Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 24, 2021 04:39 pm GMT

The .NET Stacks 67: .NET 6 RC2 arrives

Image description

Welcome to another week, full of top-notch product announcements and the proclamation of "View Source" as a crime. I too am a hacker, apparently.

Anyway, here's what we have going on this week:

  • Web updates with .NET 6 RC 2
  • New .NET 6 LINQ API: Chunk
  • Last week in the .NET world

Web updates with .NET 6 RC 2

Right on time, last week Microsoft rolled out the .NET 6 RC 2 release. It's the second of two "go live" RCs that are actually supported in production. Richard Lander's announcement post gets you up to speed on what is new with C# 10, including record structs, global usings, file-scoped namespaces, interpolated strings, and extended property patterns.

Despite being oh-so-close to the official release next month, the ASP.NET Core team was busy shipping updates for this release and I'd like to pay attention to those. We saw updates in two big areas: native dependencies and Minimal APIsthe latter of which I've admittedly beaten to death, but also plays a pivotal future in how you build new APIs in the .NET ecosystem (if you want to get over MVC, of course).

With Blazor WebAssembly, in .NET 6 you can now use native dependencies that are built to run on WebAssembly. Using new .NET WebAssembly build tools, you can statically link native dependencies. You can use any native code with this, like C/C++ code, archives, or even standalone .wasm modules. If you have some C code, for example, the build tools can compile and link it to a dotnet.wasm file. To extend it some more, you can use libraries with native dependencies as well.

As for Minimal APIs, you can now leverage parameter binding improvements. With RC2, you can use TryParse and BindAsync for inherited methods. For example, BindAsync allows you to bind a complex type using inheritance. Check out Daniel Roth's blog post for details. The RC2 release also makes some OpenAPI enhancements and includes some analyzers to help you find issues with middleware issues or route handling.

It's hard to believe the next .NET 6 announcement will be the full release itself. As part of that .NET Conf will celebrate the launch, and Visual Studio 2022 will launch on November 8. In the year 2021. (I know.)

New .NET 6 LINQ API: Chunk

If you haven't heard, .NET 6 will roll out some nice LINQ API improvements. Matt Eland recently wrote a nice piece about them. As a whole, it's nice to see .NET 6 roll out quite a few API improvements that were previously done with some light hacking. We all do some light hacking, of course, but for millions of .NET developers there are a lot of common use casesand it's nice to see those being addressed.

My favorite recent LINQ API improvement is the Chunk API. If you work with large collections of objects, you can now chunk them in case you want to work through pagination or other "chunking" use cases. For paging, you previously had to set a page size, loop through the collection, add to some paging collection, and update some counts.

Instead, as Matt notes, you could try something like this:

IEnumerable<Movie[]> chunks = movies.Chunk(PAGE_SIZE);

This should really help folks page through big API datasets. When you don't control the data coming back, you had to set this up yourself. Very nice.

Last week in the .NET world

Announcements

Community and events

Web development

The .NET platform

The cloud

Tools

Design, testing, and best practices

Podcasts and videos


Original Link: https://dev.to/daveabrock/the-net-stacks-67-net-6-rc2-arrives-4mab

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To