A Limitation of Anonymous Classes

Recently, we were editing some code for a client, specifically code that creates a list of an anonymous class, and then runs a LINQ statement on it. As part of the edit, we had to set the values of this class differently under different conditions. Regardless of the situation, though, the structure would end up…

Writing XML in Razor

On one of our recent projects, we needed to add a feature to a client’s website that would dynamically generate XML in a Razor CSHTML file. In order to do this, we first needed to tell razor that we’re writing XML, which we did by quite simply writing code to set Response.ContentType to XML’s MIME…