.NET developers, utilize Git better using the command prompt

14 September, 2014.

I’ve been using Git in Visual Studio for quite some time now (since not long after it was released) and I’ve really grown to like it. I particularly like the speed and general ease of use. I find TFS/TFVC (weather that be a local instance or TFS online) to be slow and unreliable and it really has poor command line support (sorry guys!). It’s fair to say that I’ve been a little bit intimidated by Git and have rarely (OK never!) strayed away from the UI available through Visual Studio. Until now…

Continue reading

Quick tip - Avoid 'async void'

30 August, 2014.

When developing a Web API application recently with an AngularJS front end, I made a basic mistake and then lost 2 hours of my life trying to figure out what was causing the problem … async void. Its pretty common nowadays to use tasks to improve performance/scalability when writing a Web API controller. Take the following code: At a high level, when is executed the call will be moved off onto another thread and the execution of the method will only continue once the operation is complete (when…

Continue reading

5 AutoMapper tips and tricks

23 August, 2014.

AutoMapper is a productivity tool designed to help you write less repetitive code mapping code. AutoMapper maps objects to objects, using both convention and configuration. AutoMapper is flexible enough that it can be overridden so that it will work with even the oldest legacy systems. This post demonstrates what I have found to be 5 of the most useful, lesser known features. Tip: I wrote unit tests to demonstrate each of the basic concepts. If you would like to learn more about unit testing…

Continue reading

How to create your own ASP .NET MVC model binder

11 August, 2014.

Model binding is the process of converting POST data or data present in the Url into a .NET object(s). ASP .NET MVC makes this very simple by providing the DefaultModelBinder. You’ve probably seen this in action many times (even if you didn’t realise it!), but did you know you can easily write your own? A typical ASP .NET MVC Controller You’ve probably written or seen code like this many hundreds of times; Where did Id come from? It probably came from one of three sources; the Url (), the query…

Continue reading

Should I get certified?

28 July, 2014.

The value of Microsoft certifications has split opinion for years, and both camps feel very passionate about their side of the argument. In this post I’ll try and look constructively at the value of Microsoft certifications, so you can make the decision for yourself. I’m specifically talking about Microsoft developer certifications here, but the concepts/points could likely be applied to any certifying body. 1. What are the current Microsoft Certification paths (for developers)? There is a route…

Continue reading

How to pass Microsoft Exam 70-487 (Developing Microsoft Azure and Web Services) in 30 days

26 July, 2014.

Before you continue reading this blog post, you need to be aware of the following; This is not a “quick fix” or an “easy solution”. I have not discovered some secret formula to guarantee you pass with 100% marks every time. The exam is genuinely challenging and the only way you are going to pass is by working hard! You will not find any brain dumps here! If you’re afraid of working hard to achieve your goals, you best leave now … Still Here? Congratulations, you are taking your first steps…

Continue reading

Easy WCF Security and authorization of users

19 July, 2014.

There are several steps involved in making your WCF service secure, and ensure that clients consuming your service are properly authenticated. WCF uses BasicHttpBinding out-of-the-box, which generates SOAP envelopes (messages) for each request. works over standard HTTP, which is great for completely open general purpose services, but not good if you are sending sensitive data over the internet (as HTTP traffic can easily be intercepted). This post discusses how to take a basic WCF service…

Continue reading

Entity Framework - Use a Guid as the primary key

13 July, 2014.

Using a Guid as your tables primary key, when using Entity Framework, requires a little more effort than when using a integer. The setup process is straightforward, after you’ve read/been shown how to do it. The process is slightly different for the Code First and Database First approaches. This post discusses both techniques. Code First Using a Guid as the primary key when taking the code first approach is simple. When creating your entity, add the DatabaseGenerated attribute to your primary…

Continue reading

My learning hangover

29 June, 2014.

Its virtually unheard of for me to write blog posts about anything that isn’t a language, framework, or technology but my experience recently has affected my life in so many ways it got me thinking…there must be lots of other people who have experienced this, or are heading towards it. It’s too important to not share with the community. I am of course talking about my learning hangover. Note that this is an honest and frank post, and that, to some extent, I am still experiencing a learning…

Continue reading