Practical .NET


Retrieving and Updating JSON Objects in SQL Server 2016

With SQL Server 2016, you can store JSON objects in your rows. Here’s how to work with JSON objects, including how to update them once you’ve found them.

Building the Object Model You Want with Entity Framework

When it comes to inheritance, relational database theory and object-oriented programming have more in common than you might think. Understanding that overlap is critical in designing the object model that will generate the database design your application needs.

Querying JSON Data in SQL Server 2016

With SQL Server 2016, it now makes sense to store JSON objects in your database (even though there’s no JSON datatype). Here’s how to query JSON properties to find the rows you want.

Writing Precompiled Azure Functions in Visual Studio 2017

See how the latest version of Visual Studio 2017 can be used to create Azure Functions using familiar development tools and techniques.

The Heisenberg Developer

There’s a potential security exploit that ASP.NET MVC leaves you open to. However, in Peter’s opinion, all the proposed solutions miss the point.

An Encryption Strategy

Encrypting data that you want stored in your View and returned to you when the user clicks the Submit button has its own special problems. Here’s a complete solution and, as a bonus, an Encryption object you can use anywhere.

Working with JSON in SQL Queries

SQL Server 2016 lets you treat JSON objects like rows in a table, allowing you to use data from AJAX queries in joins, updates and any other SQL statement you can think of.

Returning Simple Strings from Action Methods

When you want to return a string result -- either as text, HTML or XML -- then a ContentResult object gives you the right balance of simplicity and control.

Unit Testing AJAX Calls to an ASP.NET MVC Controller

Sometimes what you want to test is how your Action method behaves when it's invoked through an AJAX call. Here's how to mock up that call using Moq.

The Future of Programming

If you’ve been programming long enough, then you know that the "right way to do things" keeps changing. Here’s why, a description of where we are now and a guess about where we’re going.

Quick Tip: Read the Inner Exception!

That's often where the real problem is.

LocalDB: The Database Without a Connection String

If you just want to get going with a code-first database, you don't even need to define a connection string -- just write your objects.

Exploiting the Validation Tools in ASP.NET MVC

Your users will make mistakes ... but it would be a mistake to treat all their errors the same way. You can get more out of ASP.NET MVC's validation infrastructure just by paying attention to how you name your errors.

Returning JSON from SQL Server Queries

With JSON now the default format for moving data between clients and servers, SQL Server adds JSON support to make it easier to get your data out of the database and down to the client.

In-Memory ASP.NET Core Integration Tests with TestServer

Test, test and test again. You can automate those tests with a TestServer-based Web app that doesn't even touch the Web server.

Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.