Practical .NET

The Reality of Getting Started with Test-Driven Development

Moving to TDD with ASP.NET is not, in fact, as easy as everyone tells you it is. But it's not as much work as you might think, either. Here's what you need to do to start doing TDD in the real world with an existing ASP.NET MVC application.

Nesting Layouts in ASP.NET MVC

If you've got a site that contains subsites and want to visually distinguish between those subsites (while still maintaining your site's visual integrity), consider nesting layouts within layouts.

Use Constants and Enums to Improve Readability (and Reduce Maintenance)

If you're not using Const and Enums then you're just making life harder for the next programmer.

3 Ways to Manage Dependent Classes in the .NET Framework

Once you start implementing current design practices, you'll find that your typical object consists of a lot of other objects.

Best Practices for Loosely Coupled Classes

In an object-oriented world you create flexible applications by combining objects. You'll want to keep those objects loosely coupled, though, so that a change in one class doesn't force you to rewrite every class. Here's how to keep them loosely coupled.

Leverage Lambda Expressions in Your Methods

Integrating lambda expressions into your methods is easy. The trick is in recognizing when to use them. And that means understanding when the strategy and factory method patterns are going to make your applications better.

Do You Know the Answers to These Hanselman Questions?

Back when he had a job, Peter used to hire developers. When he did, there were three questions he got from Scott Hanselman's blog, way back at the beginning of the .NET Framework that he's still asking today.

It's Not the Names that Matter

As you work with other developers (and seek advice from experts) you need to make sure you're discussing what matters rather than arguing about terminology.

With ASP.NET MVC and Data Transfer Objects, The Bigger the Better

Create the best object for moving data from your Controller to your View.

Reduce Trips to the Database Service with EF.E's Future Queries

One way to slow down your application is to make multiple trips to the database. Here's a way to cut those trips in half (at least) and it has to do with the EntityFramework.Extended library.

Making Your Data Updates and Deletes More Efficient

By adding one open source library to your application (and adding two methods to your LINQ statements) you can cut the time spent on database updates and deletes in half.

A First Look at Visual Studio Code

If you're looking for a lean, mean, cross-platform, desktop code editor then Visual Studio Code might be just your cup of tea. However, if you're used to the level of functionality you get with Visual Studio, it's important to set your expectations appropriately.

Potentially Save a Trip to the Database with Updates in Entity Framework

Here's a tip about how to exploit Entity Framework's change tracking mechanism to -- possibly -- eliminate a trip to the database when you update an item. But, without some additional code, you probably can't use it.

Integrating SQL Server Reporting Services Reports and ASP.NET MVC

There are so many ways to integrate an SSRS report into your page that the biggest problem you'll face is deciding which one to use. Peter runs through all the solutions he can think of, including those cases where you want to download the report as a file.

The Best Advice You'll Get on ASP.NET MVC Routing

Here are three rules for defining ASP.NET MVC routes that you can actually understand.

Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.