March 2010
14 posts
Resolving types with Autofac using type without...
It’s really simple once you know how but it took me ages to track down the informaion on how this is done. I first started by passing in a NameService with the fully qualified name of the type, this didn’t work. I then eventually found the TypeService which works exactly how I would want. requestContainer.Resolve(new TypedService(type), new Parameter[0]) It’s all so easy once...
Mar 30th
Mar 26th
1 tag
Mar 23rd
Mar 12th
NHibernate QueryOver
It’s a small thing but I’m really looking forward to NHibernate 3.0 with QueryOver.
Mar 10th
Mar 10th
Mar 10th
Oooooo I can’t wait until this is out RT @CrypticAlivet: This gave me chills: http://bit.ly/cyDtvI
Mar 9th
Mar 9th
1 tag
Marcus Starnes .digital photography →
The last few photos were taken from a good friend’s site and personal collection.
Mar 9th
1 tag
Mar 9th
1 tag
Mar 9th
2 tags
Invalid index N for this SqlParameterCollection...
Well I have run into this a few times in the past, however as always I forget what the error meant. I googled as usual and found a guy called Derik Whittaker describing exactly the same issue, however his fix was to do with the foreign key as well as the mapped object. Now my mappings didn’t have the duplicate foreign keys so I went off for a while trying to work out what the problem...
Mar 9th
1 note
2 tags
NHibernate - Unexpected row count: 0; expected: 1
Using NHibernate I get this now and again and I always forget why. The reason is often because it doesn’t know that an item you have added should be auto saved, make sure you double check the unsaved-value attribute and that when your class has the correct default value, basically the same as your unsaved-value attribute. Simple really but hopefully it will save someone some heartache...
Mar 9th