Category Archives: cSharp

How to Test async and await

This is one of those, “please stop forgetting this dummy” posts aimed at myself. When you want to test an asynchronous method implemented via the Task-based Asynchronous Pattern (TAP) don’t forget to change the default test method; Default: [TestMethod] public … Continue reading

Posted in cSharp, Development | Tagged , , , | Leave a comment

Poor mans ORM–how to easily persist data

Carrying on from my post about easily loading data from a database into a list, I thought I’d publish how to easily save the data from a list of objects into the database. It works by convention, so you need … Continue reading

Posted in cSharp | Tagged | Leave a comment

MVC does not find the controller

In a previous post I talked about using MVC’s controller injection to drop in DLLs that contain controller classes. It allows for a nice separation leading onto creating a composite UI. I was happily using this mechanism when it just … Continue reading

Posted in Computers and Internet, cSharp | Tagged , | Leave a comment

Poor mans composite UI or separating out controllers in MVC3

I was looking to create a simple composite UI style application in Microsoft MVC3. What I want is a host MVC application that will compose its UI from other Controllers and Views packaged in other DLLs. The concept comes from … Continue reading

Posted in cSharp, Development, Visual Studio | Tagged , , | Leave a comment

nHibernate CreateQuery gotcha

As an nHibernate newbie I wasted a bit of time trying to get the Hibernate Query Language (HQL) CreateQuery function to work for me. Even the simplist query failed to work, e.g. I have a class MyEntity and I wrote … Continue reading

Posted in cSharp | Leave a comment

Great talk about ADO Data Services

Just finished watching a really could talk from Mix09 about ADO.NET Data Services. I’ve been wondering about where the business rules really fit with ADO.NET DataServices and the Entity Framework. This has gone a long way to helping me understand … Continue reading

Posted in cSharp | Leave a comment

The wacky world of serializers

 Recently I’d set my debug exception handling to catch pretty much every exception thrown and I kept seeing a rather strange error… System.IO.FileNotFoundException occurred  Message="Could not load file or assembly myType.XmlSerializers"   What was odd about this error is that … Continue reading

Posted in cSharp | Leave a comment