Tips & How-To Articles, Tutorials

  • 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! 04/10/2019

  • Finding Layout Views in ASP.NET Core

    ASP.NET Core has a more sophisticated way of finding the right layout View for your View. It does that by distinguishing between "local" and "global" Views. You can take advantage of this to simplify your life. 04/04/2019

  • 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. 04/01/2019

  • 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. 03/29/2019

  • Keeping Configuration Settings in Memory

    You've got some "sensitive" settings that you'd rather not keep in a plain text file on your site. Good news: You can keep your settings anywhere you want (in code, in a database) and your application won't care. 03/26/2019

  • Protect Yourself: Export Visual Studio Settings

    If you've been configuring Visual Studio to meet your needs, you should protect yourself against disaster by exporting your settings. 03/21/2019

  • 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. 03/18/2019

  • Routing Razor Pages

    By default, the URLs you use to access Razor Pages are tightly tied to file names and folders in your project -- not something you could call "loose coupling." Fortunately, you can change that. 03/15/2019

  • 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. 03/14/2019

  • Proving You're Making a Difference with Code Metrics

    You've rewritten some code to make it "better" ... how do you know that? 03/13/2019

  • Cycling Through All of the Object References in Visual Studio

    You want to find all the places some object is used and, once you've found them, walk through them. Good news! You're just two keystrokes away from your goal. 03/12/2019

  • 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. 03/11/2019

  • Initializing a Project with an Existing Database

    You want to use code-first Entity Framework and the idea of driving your database schema from your object model makes sense to you. Here's what you need to do when you're extending an existing database both in the .NET Framework and .NET Core. 03/11/2019

  • 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. 03/08/2019

  • 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. 03/05/2019

  • 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. 03/05/2019

  • 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. 03/04/2019

  • 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. 03/04/2019

  • 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. 03/01/2019

  • Designing with the Dependency Inversion Principle

    DIP may sound abstract but, of all the software design principles, Dependency Inversion is the one you understand best. Better yet, it describes how to build stable applications. 02/27/2019

  • 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. 02/26/2019

  • Redirect Code in .NET Core

    As you invest in RESTful Web services, you need to get better at returning the right HTTP status codes to your client. Here are the redirect codes that have helper methods in your Controller and when you should use them. 02/25/2019

  • Returning Files from .NET Core or ASP.NET MVC Controllers

    You have multiple choices when it comes to returning files from your Controller to the client: It all depends where your file is. 02/22/2019

  • 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. 02/21/2019

  • 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. 02/20/2019

Upcoming Events