Document databases are a form of NoSQL database that may store all of the information for a given object in a single instance in the database.
- By Jason Roberts
- 12/12/2016
Every once in a while you'll need to use the LINQ Join to get the data you want.
If you're using Skip and Take in LINQ to page through your data, a tweak to your syntax can cut your response time by as much as 10 percent as you page through your data.
A .NET port of the Ruby library allows for experimental testing of code that's gone to production.
- By Jason Roberts
- 11/30/2016
When you're testing an ASP.NET MVC controller (or, really, any class at all) you want to make sure the code that fails is the code you're testing. Moq provides a simple way to isolate the code you're testing and lets you generate test cases.
Sometimes you want child objects retrieved with the parent object, and sometimes you don't. What you NEVER want is to retrieve child objects accidentally. Here's Peter's advice on how to get the best performance when loading child objects.
Script bundling speeds up your application by reducing the time it takes to download all of your JavaScript code. But you'll need another object to get your files added to the page in the order you want.
In test-driven development, you have to decide how you'll divide your test methods between your test classes. The best solution is the one that requires the least effort on your part and implements the Single Responsibility Principle for tests.
There are two attributes you can put on your entity class properties: one is a convenience, the other is essential, and both are required when the primary key for a table consists of two columns.
Here's how to use SpecFlow to convert plain-text scenario steps into .NET types.
- By Jason Roberts
- 10/31/2016
An HTML Helper is a bit of Razor code that can be called from multiple places in a View. But, if you put your Helper in the right place, you can also use it from any View in your application.
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.
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.
If you're not using Const and Enums then you're just making life harder for the next programmer.
Once you start implementing current design practices, you'll find that your typical object consists of a lot of other objects.