How To


Writing the Code for a gRPC Service and Client in ASP.NET Core 3.0

Once you've got a contract that describes a gRPC service, creating the service itself and a client that can call the service is easy. In fact, Visual Studio will do most of the work for you ... once you've got your projects set up correctly, that is.

Defining Your First gRPC Service in an ASP.NET Core 3.0 Project

gRPC services promise a lot: better performance, more sophisticated messaging, and a contract-based approach to Web Service development. If those sound good to you, here's how to get started.

Two 'Gotchas' (and Fixes) for Blazor in .NET Core 3.0

The release version of Blazor contains two surprising changes (surprising, at least, to Peter) -- changes that broke some of his code. Here are both of those "gotchas" with the workarounds that he implemented.

City Lights Illustration

Getting Started with AutoML for ML.NET

Dr. James McCaffrey provides hands-on examples in introducing ML.NET, for machine learning prediction models, and AutoML, which automatically examines different ML algorithms, finds the best one, and creates a Visual Studio project with the C# code backing the best model, along with C# code that shows how to use the trained model to make a prediction.

Decrypting (But Not Really Encrypting) Configuration Settings in ASP.NET Core

You can store encrypted values in your ASP.NET Core configuration file and seamlessly decrypt the values as you retrieve them. But there are, at least, two issues that you'll need to address.

Matrix

How to Do Neural Network Glorot Initialization Using Python

Microsoft Research data scientist Dr. James McCaffrey explains what neural network Glorot initialization is and why it's the default technique for weight initialization.

Color Shards

How to Integrate Blazor Components

You can create Blazor components by combining other Blazor components but you'll almost certainly need to share data between those components. Here are all the options currently open to you.

What Are gRPC Web Services and When Should I Use Them?

ASP.NET Core allows you to create Web Services based on gRPC ... which raises two questions: "What is gRPC?" and "Does it ever make sense to use it?" Here are Peter's answers.

Agile Development: How to Pick the Most Valuable User Stories

Some of the critical problems for any team working in an Agile way are managing the backlog of user stories, converting epics into stories, preventing scope creep, and -- most importantly -- picking the most valuable stories for the next sprint. Impact mapping provides a visual solution for all these issues.

How to Update Members of a Collection with LINQ

Sometimes it's just cool to take a walk through some technology to find all the different ways you can solve a problem -- sort of "Fun with the .NET Framework." Here's a look at all the ways that Peter could think of to update an object in a collection ... some of which may be foolish.

How To Code Modern Neural Networks Using Python and NumPy

Data scientist Dr. James McCaffrey begins a series on presenting and explaining the most common modern techniques used for neural networks, for which over the past couple of years there have been many small but significant changes in the default techniques used.

The Service Layer in Software Development Doesn't Exist

While the concept of "service classes" probably has some value when it comes to organizing the objects you're dealing with, the idea of a "service layer" has no value at all when it comes to building applications.

How to Do Thompson Sampling Using Python

Suppose you have three different Internet advertising strategies and you want to determine which of them is the best as quickly as possible. Or suppose you work for a medical company and you want to determine which of three new drugs is the most effective. Resident data scientist Dr. James McCaffrey shows how Thompson Sampling can help.

How to Dynamically Build the UI in Blazor Components

You have two tools for generating your initial UI in a Blazor component: ASP.NET's Razor and Blazor's RenderFragment. Here's how to use both to integrate with your C# code (and a warning about what you can't do).

Creating a Custom Tag Helper in ASP.NET Core: Generating HTML

The beauty of a tag helper is it's ability to add new HTML to your page. Once you know what you want to change, here are the tools to change the HTML going to the user.

Creating a Custom Tag Helper in ASP.NET Core: Gathering Data

You can create your own custom tag helpers ... but it's a lot easier if you understand the process that tag helpers need to go through. Here are your options when gathering the data that a tag helper needs (and why they can't completely replace HtmlHelpers).

The Fundamentals of Improving Productivity with Custom Tag Helpers in ASP.NET Core

Whenever you have repeated HTML, you should be creating your own tag helpers to simplify your views. Here's how flexible tag helpers can be when you go to integrate them into your page.

Visual Studio 2019 Productivity Cheat Sheet

Several new time-saving keystroke combinations were recently detailed by Kendra Havens, program manager for .NET and Visual Studio, in a Channel 9 video presentation. Here's a roundup of the new stuff, along with old favorites, and a list of other productivity resources.

Naive Bayes Classification Using Python

Dr. James McCaffrey of Microsoft Research uses Python code samples and screenshots to explain naive Bayes classification, a machine learning technique used to predict the class of an item based on two or more categorical predictor variables, such as predicting the gender (0 = male, 1 = female) of a person based on occupation, eye color and nationality.

Blazor on the Server: The Good and the Unfortunate

Blazor on the Server is coming with .NET Core Version 3.0 in the second half of 2019. Here's what Peter thinks of that (and he's not completely happy).

ASP.NET Core Security, Part 1

Eric Vogel kicks off his series on ASP.NET Core security by showing how to set up authentication to register, log in and log out a user account in an ASP.NET Core MVC application.

Logging in .NET Core

.NET Core provides a framework that logging systems can be snapped into. However, what's most important about this framework is how you write your messages out. It's the quality of the message that will let you find where your problems are.

Working with Dynamic Objects: Beyond the Basics with ExpandoObjects

ExpandoObjects let you dynamically add members to your object at run time -- a great way to handle scenarios where you need a lot of flexibility. But how do you work with an object when you don't know the names of its properties?

Weighted k-NN Classification Using Python

Need to predict the political party affiliation (democrat, republican, independent) of a person based on their age, annual income, gender, years of education and so on? Our resident data scientist Dr. James McCaffrey shows a technique that can help with that and much more -- with code!

Making It Up as You Go Along with ExpandoObjects

You can give your users the ability to store any data they want, including stuff they make up at run time, by using an ExpandoObject. In fact, when you don't know what your data is until run time (and you can live without IntelliSense), an ExpandoObject is your best solution.

Subscribe on YouTube