Roundup #71: C# Source Generators, MsQuic, CoreBoy, Channels

Follow @CodeOpinion on Twitter

Introducing C# Source Generators

We’re pleased to introduce the first preview of Source Generators, a new C# compiler feature that lets C# developers inspect user code and generate new C# source files that can be added to a compilation. This is done via a new kind of component that we’re calling a Source Generator.

Link: https://devblogs.microsoft.com/dotnet/introducing-c-source-generators/

MsQuic is Open Source

Microsoft is open sourcing our QUIC library, MsQuic, on GitHub under an MIT license. MsQuic is a cross-platform, general-purpose library that implements the QUIC transport protocol. QUIC is being standardized by the Internet Engineering Task Force (IETF). MsQuic is a client and server solution optimized for multiple usage patterns and is used by multiple Microsoft products and services. MsQuic is currently in preview and supports Windows and Linux.

Link: https://techcommunity.microsoft.com/t5/networking-blog/msquic-is-open-source/ba-p/1345441

CoreBoy

Link: https://github.com/davidwhitney/CoreBoy

Working with Channels in .NET

Channels enable a producer to safely pass data over to a consumer along with the appropriate notifications in both directions.

In this episode, Stephen Toub chats with Rich about the what, why and how of using the System.Threadding.Channels library. They walk us through a simple demo of using channels and also discuss the various strategies at our disposal.

Link: https://www.youtube.com/watch?v=gT06qvQLtJ0

Follow @CodeOpinion on Twitter

Software Architecture & Design

Get all my latest YouTube Vidoes and Blog Posts on Software Architecture & Design

Roundup #67: Cert Expiration Check, Should I use MicroServices? StackOverflow Survey, gRPC-Web

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Follow @CodeOpinion on Twitter

Certificate Expiration Check

I thought this was a pretty cool idea and an easy way to keep track of expiring certs.

Link: https://github.com/ardalis/CertExpirationCheck

Should I Use A Microservices Architecture?

Are you considering adopting a microservices architecture? Won’t it fix all your problems? Join me for a look into the realities of microservices!

Link: https://www.jamesmichaelhickey.com/microservices-architecture/

2020 Stack Overflow Developer Survey

Thank you for taking the 2020 Stack Overflow Developer Survey, the largest and most comprehensive survey of software developers (and anyone else who codes!) on Earth. 

Link: https://stackoverflow.az1.qualtrics.com/jfe/form/SV_eL0mFVwuo7KWeXP

A new experiment: Call .NET gRPC services from the browser with gRPC-Web

I’m excited to announce experimental support for gRPC-Web with .NET. gRPC-Web allows gRPC to be called from browser-based apps like JavaScript SPAs or Blazor WebAssembly apps.

gRPC-Web for .NET promises to bring many of gRPC’s great features to browser apps:

Strongly-typed code-generated clients
Compact Protobuf messages
Server streaming

Link: https://devblogs.microsoft.com/aspnet/grpc-web-experiment/

Follow @CodeOpinion on Twitter

Software Architecture & Design

Get all my latest YouTube Vidoes and Blog Posts on Software Architecture & Design

Roundup #64: Migrate from JSON.NET to System.Text.Json, Endpoint Debugging, ToQueryString, CreateDbCommand

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

Follow @CodeOpinion on Twitter

How to migrate from Newtonsoft.Json to System.Text.Json

This article shows how to migrate from Newtonsoft.Json to System.Text.Json.

System.Text.Json focuses primarily on performance, security, and standards compliance. It has some key differences in default behavior and doesn’t aim to have feature parity with Newtonsoft.Json. For some scenarios, System.Text.Json has no built-in functionality, but there are recommended workarounds. For other scenarios, workarounds are impractical. If your application depends on a missing feature, consider filing an issue to find out if support for your scenario can be added.

Link: https://docs.microsoft.com/en-gb/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to

Endpoint Debugging in ASP.NET Core 3 Applications

Nothing can be more frustrating than going into a situation “thinking” you know how a framework works, only to spend the next several hours pulling your hair out and stewing in a pot of unhealthy feelings. I like to consider myself an ASP.NET routing expert with my experience dating back to MVC 1.0. Recently, I’ve started using ASP.NET Core Razor Pages mixed in with MVC and API approaches. I find the combination of all this technology to be a winning one, but it can also add complexity when building views. In this post, I’ll show you a simple one page Razor Page that can help diagnose route resolution issues quickly. Quickly see what your ASP.NET Core application sees and what it requires to resolve routes.

Link: https://khalidabuhakmeh.com/endpoint-debugging-in-asp-dot-net-core-3-applications

Introducing EF Core 5 Features: Using ToQueryString to get generated SQL

EF Core 5.0 introduces the ToQueryString extension method which will return the SQL generated by EF Core when executing a LINQ query.

Link: https://blog.oneunicorn.com/2020/01/12/toquerystring/

CreateDbCommand: I’ll see your string and raise you a command…

Instead, EF Core 5.0 introduces CreateDbCommand which creates and configures a DbCommand just as EF does to execute the query.

Link: https://blog.oneunicorn.com/2020/01/15/createdbcommand/

Follow @CodeOpinion on Twitter

Software Architecture & Design

Get all my latest YouTube Vidoes and Blog Posts on Software Architecture & Design