Practical .NET


Automatic Sorting for Your Collections

The .NET Framework has two collections that will guarantee your items are always sorted whenever you process the collection. Here's how to choose between the two and how to control the sort order (including supporting duplicate entries).

ConventionTests, Part 2: Creating Custom Conventions in ASP.NET

Now that you know how to use them (see Part 1 if you don't), it's time to create custom ones.

Everything You Didn't Know About Shared and Static Members

Peter's convinced you're not using Shared and static members enough, but then he's also convinced that none of you know about all the ways you can use those two keywords.

Retrieve and Update Entity Framework with Dynamic Queries

You don't have to give up on creating dynamic queries just because you're using Entity Framework. Entity SQL and ObjectQuery will let you generate queries at runtime and still let you update your data through Entity Framework.

Keeping Your Next Developer Job

You don't need to worry about keeping your current job -- it will be gone, eventually. What you want to worry about is keeping your next job. That means developing the right skills to the right level for the package you intend to provide to employers.

Creating a Simple Collection Class

Here's the simplest possible code for creating a custom collection class in the Microsoft .NET Framework that includes support for For…Each loops, an indexer method and initializing collections with {…}.

Beyond Unit Tests with ConventionTests

Be triple sure your code works by augmenting your test platform. This nifty open source library will do that.

Managing Your Skills Portfolio

There's no right answer to "What technology should I learn next?" But there is a way to manage your skills to maximize the return you get from them.

Dynamic Data Access with Plain Old SQL and SqlQuery

You don't have to give up using dynamic SQL just because you're using Entity Framework. The Entity Framework SqlQuery method will give you back the flexibility of dynamic SQL and still let you work with your data in an object-oriented way.

Take Control of Exceptions with a Custom Exception Object

If you really want to take full control of the exceptions you pass to your clients, you can write your own Exception class. Here's how to do that, complete with support for additional properties.

Managing Complex Web Requests

A complex ASP.NET MVC form can drive you to a big, ugly action method that handles all the functionality the page offers. The ActionMethodSelector provides a clean way to separate that logic over multiple methods, provided you understand a key distinction of which many ASP.NET MVC developers aren't aware.

Creating Complex XML Documents with XML Literals

If you're creating an XML document and want to write code that you'll actually be able to maintain … well, it may be time to learn a little Visual Basic, just so you can use XML Literals. It's a good solution even for C# shops.

Leveraging a Visual Studio Database Project

Peter shows how a Visual Studio database project can make you more productive when making changes to your database. But a database project also gives you a variety of tools to let you keep track of what those changes are -- which will make moving those changes to your production environment considerably safer.

In Praise of the Maintenance Programmer

The developers building new applications are very nice people, of course. But the real heroes of the programming world are the developers maintaining and extending existing applications.

Simplifying Development with Visual Studio Database Projects

Peter learns something by listening to readers: Visual Studio database projects provide a great environment for making changes to your databases. Here's a brief introduction about how they'll make life easier for you and all the steps for setting one up.

Subscribe on YouTube