Practical .NET


Making Your Life Easier with C# Scripting

Test projects give you a way to exercise your code to see if it works but they're also part of your project's "permanent record." If all you want to do is try something out with some throwaway code, C# Scripting in Visual Studio might be a better choice.

Converting JSON Objects to Relational Tables, Part 2: Creating Related Tables

SQL Server's OpenJson function will let you dismantle JSON structures into relational tables, including tables with foreign/primary key relationships.

Converting JSON Objects to Relational Tables: Flattening the Object

Here's how you can use SQL Server's OpenJson function to dismantle JSON structures into relational tables targeting either transactional systems or data warehouses.

C# 9: Value Objects and Simpler Code

C# 9 gives you a better way to create value objects and some simpler code to use while doing it. But even if you don't care about value objects, the new keyword has some cool changes.

What's Cool in C# 8 and .NET Core 3

You're missing out on some cool features if you're building applications in .NET Core 3 and not exploiting the new features in C# 8. Here's what Peter thinks are the ones you'll find most useful.

Working with Local Storage in a Blazor Progressive Web App

Thanks to Chris Sainty and Remi Bourgarel, working with local storage from a Blazor application running either in the browser or out of it is relatively easy. Testing your code can be equally easy but only if you set up support the real world of network connections.

Write Once, Run Everywhere with .NET and the Uno Platform

Right now, in Visual Studio, you can create a solution that takes a single UI with its code and shares it across Windows, Android, macOS, iOS and web browsers. It's not a perfect cross-platform solution (yet), but it's here now.

The End of Integration Testing: If You've Passed All the Tests ...

Really, you only need to do two kinds of testing: Unit testing (to make sure that your individual components work) and end-to-end testing (to make sure your application works). Anything else is just a waste of your time.

Creating Flexible Queries with Parameters in GraphQL

GraphQL gives clients who call your Web services the ability to specify what properties of your data objects they want. Here are two ways to let those clients also specify which data objects they want.

Red Pedal Close Up

Letting the Client Control Data Retrieval with GraphQL in .ASP.NET Core

GraphQL lets you create data access services without writing controllers. Instead of writing procedural code, you declare schemas describing what queries you'll accept and what you're willing to return. Here's how to get started in ASP.NET Core.

Suppressing Events in Blazor and ASP.NET Core Version 3.1

ASP.NET Core Version 3.1 adds some new features for managing events in Blazor. You may think you'll never need them, but there may be a time when you'll be glad to know about at least one of them.

Color Shards

Sharing Data and Splitting Components in Blazor

ASP.NET Core Version 3.1 has at least two major changes that you'll want to take advantage of. Well, Peter thinks you will. Depending on your background, your response to one of them may be a resounding β€œmeh.”

Don't Do It All Yourself: Exploiting gRPC Well Known Types in .NET Core

If you're creating business services that send dates and decimal data then you may be concerned that gRPC services don't support the relevant data types. Don't Panic! There are solutions. Here's how to use them.

Circl

Implementing State in .NET Core gRPC Messages with oneof

In the real world, you've been dealing with the State pattern every time you designed a set of database tables. The Protocol Buffers specification lets you do the same thing when you define the messages you send and receive from your gRPC Web Service.

Reusing and Recycling Data Structures in gRPC Services in .NET Core

Here's everything you need to know to create a standard set of reusable message formats to use with your gRPC services.

Subscribe on YouTube