The .NET Stacks #67: 🆕 .NET 6 RC2 arrives

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: Ch…


This content originally appeared on DEV Community and was authored by Dave Brock

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 APIs—the 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 cases—and 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


This content originally appeared on DEV Community and was authored by Dave Brock


Print Share Comment Cite Upload Translate Updates
APA

Dave Brock | Sciencx (2021-10-24T16:39:29+00:00) The .NET Stacks #67: 🆕 .NET 6 RC2 arrives. Retrieved from https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/

MLA
" » The .NET Stacks #67: 🆕 .NET 6 RC2 arrives." Dave Brock | Sciencx - Sunday October 24, 2021, https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/
HARVARD
Dave Brock | Sciencx Sunday October 24, 2021 » The .NET Stacks #67: 🆕 .NET 6 RC2 arrives., viewed ,<https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/>
VANCOUVER
Dave Brock | Sciencx - » The .NET Stacks #67: 🆕 .NET 6 RC2 arrives. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/
CHICAGO
" » The .NET Stacks #67: 🆕 .NET 6 RC2 arrives." Dave Brock | Sciencx - Accessed . https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/
IEEE
" » The .NET Stacks #67: 🆕 .NET 6 RC2 arrives." Dave Brock | Sciencx [Online]. Available: https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/. [Accessed: ]
rf:citation
» The .NET Stacks #67: 🆕 .NET 6 RC2 arrives | Dave Brock | Sciencx | https://www.scien.cx/2021/10/24/the-net-stacks-67-%f0%9f%86%95-net-6-rc2-arrives/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.