You probably use ToList to convert your LINQ results into Lists. It's almost as easy to convert any collection into a Dictionary whose items you can retrieve by key.
As a company's problems continue to become more complicated, your code will become more complicated. Peter shows how refactoring code can lead you to better designs.
Peter gets an improved tip from one reader and some more tips from another, all designed to navigate Visual Studio faster.
Sometimes life is like playing Whack-a-Mole: You write some code that solves a problem, and then someone comes along and makes the problem harder. Here's how to continuously integrate new solutions without having to rewrite your old solutions (much).
Peter didn't bother doing any performance testing but he believes that this change has just got to speed up your ASP.NET MVC application.
You can turn on logging for your Entity Framework code with a single line. Configuring it to write to a file takes only a little bit more effort.
I don't believe in coding design tools. I've been programming for more than 30 years now (40 years if you go back to my first class in programming). I think in code. Code is my design language and procrastination is my friend.
When you hit a breakpoint in Visual Studio, everything stops. If you'd rather other processes keep running, you can enable that.
There's more (and some less) in Entity Framework Core compared to Entity Framework 6, at least in version 1.0. While you can move to Entity Framework Core now, it might be too early for you.
If you run an automated test and your test fails then you want to know that it's your fault -- not a problem in someone else's code or the result of a change in your test data. Moq lets you do that in two lines of code, even if your code uses the ASP.NET Session object.
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.