Practical .NET


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.

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.

Working with Session in ASP.NET MVC Core (or: Why You Can't Migrate)

Here's everything you need to write code for the Session object in ASP.NET Core -- including why you can't expect to migrate your existing ASP.NET MVC application to ASP.NET MVC Core (though Peter has some suggestions on easing that pain).

Creating Web Pages with Blazor: The Basics

If you know how to create an ASP.NET MVC View, you know a great deal about how to create pages in Blazor. But, by packaging up pages as Blazor Components, you can use (and re-use) those pages more like objects.

Finding Your Objects in ASP.NET Core

Central to ASP.NET Core is the collection of objects that give you access to ASP.NET Core functionality. Here's how to access it, how to add to it and an example of how to use this technology with the "difficult" cases.

Programming Will Always Be Hard

If you're a programmer then you know that you frequently get things wrong. Sometimes you find those bugs before your application gets to production ... and sometimes you don't. Bad news: Nothing is going to help and it's not going to get any better.

Providing Constant Context for .NET Core Tests

By default, tests in the new .NET Core testing framework (xUnit) are isolated. This is a good thing ... except when you need to create a single test environment that is used by multiple tests. Here's all the ways you can provide a single environment for a set of tests in xUnit.

Writing xUnit Tests in .NET Core

There's a new testing framework in town. Here's how to use it.

Introducing the .NET Core Unit Testing Framework (or: Why xUnit?)

There's a new kid in the Visual Studio testing environment, though it's only for your .NET Core projects. You don't have to use it, but here are some reasons you'll want to.

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.

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.

The Fastest Data Access Possible with Compiled Procs

If, in your "need for speed," you're looking to access and update your data as fast as possible, you can get to that goal by combining memory-optimized tables with compiled procs.

Speed Up Your Application with SQL Server In-Memory Tables

If screaming speed in data access is the most important thing in your life, SQL Server's durable in-memory, memory-optimized tables are your answer. They were good in SQL Server 2014 and they're even better in SQL Server 2016, 2017 and Azure.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events