The XML datatype in SQL Server allows you to store, process and query XML rather easily. There are some caveats, however: You can not compare or order by an XML data type field in SQL Server Entity Framework does not support the XML data type, so your XML field will be converted to a string Continue reading →
If you use OWIN Authentication Cookies with ASP.NET Identity, you might want to invalidate all cookies when the user signs out of your application. To do this, we simply need to get all cookies from the HTTP request, and then add them to the response with an expiration date that has already passed. Here’s how Continue reading →
LINQ (Language-Integrated Query) is a part of the C# and Visual Basic .NET languages that lets you “query” data collections, databases and XML documents (and anything else that you write a custom LINQ provider for). The syntax will feel very familiar to anyone who has experience writing SQL queries. SQL allows for the creation and Continue reading →
While working with Microsoft’s Open XML SDK 2.5, I came across some difficulties writing dates to an Excel workbook. When writing dates to an existing Excel file used as a template, I noticed that the dates I was passing to my writeToCell() method did not match the dates I found when I opened up the Continue reading →
As I embarked on a new mission to write a home media server application in C#, I needed a way to store an index of media files on my home computer. I could have gone the flat-file route, and stored file information in a simple delimited index file. Instead, I decided to delve into object-relational Continue reading →