How To


Managing Page Layouts in Blazor

Blazor, like most systems for generating Web pages, supports using layout pages for repeated content. Here's what works, what doesn't (yet) work and work-arounds I've discovered for what doesn't work.

Managing Production and Development Settings in ASP.NET Core

The reality is that you will need to have, at least, two different configurations: one for production and one for development. Here's how to automate those conversions.

Extending Razor Pages

If you move beyond the basics of working with Razor Pages, there are at least two things you should know to support creating Pages that do more than one thing and integrate with existing code.

Navigating in Blazor

If you're moving your application's client-side code to Blazor, then you'll want Blazor to manage navigating between pages, too.

Quick Tip: How to Try .NET Core 3.0 in Visual Studio 2019

.NET Core 3.0 won't be ready for Visual Studio 2019's April 2 ship date, but a manual download and a menu configuration setting will let you use both previews together right now.

Dealing with Databases (and Data) in Docker

There are lots of ways to handle databases in a containerized environment like Docker. Here's how to create SQL Server in a container, how to load it with the data you want and how to integrate that container into whatever project needs it. Be warned: Some PowerShell is used.

Docker with Real Applications

Here's how to run a "real-world" application (consisting of an MVC application and a Web Service) in a networked set of Docker containers. And it's just a couple of mouse clicks in Visual Studio to implement it.

Neural Anomaly Detection Using Keras

Our resident doctor of data science this month tackles anomaly detection, using code samples and screenshots to explain the process of finding rare items in a dataset, such as discovering fraudulent login events or fake news items.

Support Vector Machines Using Accord.NET

The Data Science doctor delves into supporting vector machines, software systems that can perform binary classification such as creating a model to predict the gender of a person based on their age, annual income, height and weight.

Building Razor Pages

If you want to handle the most common pattern in ASP.NET Controllers (displaying a page and then accepting data entered into it), you can do it with Razor Pages. You'll just need less code than if you used a Controller, a View and a model object.

Getting Started with Razor Pages: A Better Model for Web Development?

As fond as he is of using Controllers and Views, Peter isn't sure that Razor Pages aren't a better model for Web development. But the first step, adding Razor Pages to your project, isn't as easy as it should be. And, after that, you'll want to integrate them with your existing MVC application.

Accessing Configuration Settings in ASP.NET Core

In ASP.NET Core, your web.config file with its <appsettings> section is gone. The replacement is a more extensive and configurable system that you can leverage to simplify configuring your objects.

What's New in and Getting Started with Blazor 0.8.0.0

There are good reasons to keep working with Blazor 0.8.0.0 ... but you're going to need to make some changes.

Configuring Your Application-Wide Objects in ASP.NET Core

ASP.NET Core's support for sharing objects defined at startup is great ... but what if you need to set options on those objects? Here's a case study that starts off great and then descends into over-engineered madness (but only if you want to go that far).

Creating the Right Database Initializer for Entity Framework

If you want to treat your database design as an "implementation detail" that just falls out of getting your object model right, then Entity Framework gives you four choices. Picking the right one, however, may mean creating your own.

Building RESTful Services Using ASP.NET Core

ASP.NET Core makes building RESTful services easy and comfortable, says Joydip Kanjilal, who shows how to do just that in this article, complete with code samples and screenshots.

ASP.NET Core: Learning the Ropes, Part 3

Eric Vogel uses code samples and screenshots to demonstrate how to create and use the views and controller for an ASP.NET MVC Core CRUD application.

Self-Organizing Maps Using Python

Dr. James McCaffrey of Microsoft Research uses a full project code sample and screenshots to detail how to use Python to work with self-organizing maps (SOM), which let you investigate the structure of a set of data.

Adding Blazor to Existing HTML+JavaScript Pages

Not only can you integrate JavaScript with Blazor, that integration provides a strategy for moving your existing pages to Blazor without having to rewrite your existing JavaScript code.

Subqueries in LINQ

If someone tells you that LINQ doesn't support subqueries ... well, they're not wrong. But they're also not entirely correct, either. With LINQ you can meet many of the goals of SQL subqueries including the ability to build complex queries out of simpler ones.

Blazor: Working with Events

Blazor expert Chris Sainty provides hands-on code samples to explain how to handle DOM and user-defined events in Microsoft's experimental project for writing browser-based apps with C# instead of JavaScript.

Adding Custom Processing to Requests in ASP.NET

ASP.NET Web API and ASP.NET MVC have similar (but not identical) mechanisms that allow you to customize how your requests and responses are processed. Not surprisingly, ASP.NET Web API's implementation is both easier and more flexible than ASP.NET MVC.

Processing Every Request and Response in ASP.NET

You have at least two options for adding processing to multiple controllers without duplicating code in each of the Controllers.

Q-Learning Using Python

The Data Science Doctor explains how to use the reinforcement learning branch of machine learning with the Q-learning approach, providing code on how to solve a maze problem for an easy-to-understand example.

ASP.NET Core: Learning the Ropes, Part 1

Eric Vogel shows how to create a new ASP.NET Core Web application using Visual Studio 2017.

Subscribe on YouTube