Entity Framework Code-First and Code Only

Summary In this blog post I’m going to explain the basics of Entity Framework code-first. I’ll show how to setup your context so that a database is not generated. Code-First / Code-Only If your database is already in place, then the most obvious method of using EF is to use Database First. This is where … Read moreEntity Framework Code-First and Code Only

XML Serializing Nullable Optional Attribute

Summary The title of this blog post is a bit of a mouth-full. I do a lot of xml serialization and de-serialization. It’s all part of the new paradigm of using APIs to communicate with other systems over the Internet. One of the annoying “features” of the xml serializer is that it doesn’t support nullable … Read moreXML Serializing Nullable Optional Attribute

Unit Testing Methods that Call Stored Procedures

Summary One of the biggest problems I used to find in unit testing is that most of the products I work on contain mostly methods that access a database. I found that most objects and methods work with data and it’s very tedious to try and mock or fake the database component. If you’ve followed … Read moreUnit Testing Methods that Call Stored Procedures

Writing a Windows Service with a Cancellation Feature

Summary I’ve blogged about how to write a windows service before (click here). In my previous blog post I did not deep-dive into how to handle a cancel request issued by someone who is clicking on the stop button. In this article, I’m going to expand on the previous article and show how to setup … Read moreWriting a Windows Service with a Cancellation Feature