by Mikael Henriksson
8. August 2010 21:53
This is a response to John Sonmez post “Don’t Parse That Xml”. I am not going to say that John is wrong on the generation part, it’s a good tip but he seems to totally have forgotten about LINQ to XML. I have had to work with some API’s that don’t benefit from that type of generated schema a...
[More]
9bcedad0-e092-4db7-94f6-4fa1c81d0cc8|0|.0
Tags: C#, xml
C# | Xml
by Mikael Henriksson
3. July 2010 11:04
One of my favorite utilities when working with 1. C#, 2. ORM, 3. DBA has been and will always be Inflector. It takes any string input and changes ist’s form. For instance it can make your "some_table" in the database become "SomeTable" in C# by calling the right method. T...
[More]
1e5c4374-1f15-47d8-869b-f51481350212|0|.0
Tags: C#
C# | Tools
by Mikael Henriksson
5. June 2010 23:26
Today I did something brain numbing moving away from NUnit to Machine Specifications. The reason being, it’s a lot nicer from a business perspective. In this case the business is open source and free of charge but it makes more sense. The way mspec forces me to think about the test context and the...
[More]
by Mikael Henriksson
5. June 2010 18:32
I admit it does not work for everything and only in C# 4 but it’s a useful extension none the less. public static IEnumerable<T> RemoveDuplicates<T>(this IEnumerable<T> items)
{
return new HashSet<T>(items);
}
The hash set does not allow duplicates!
a8e7515c-2efd-4e6c-85a1-4d979ba9e956|1|5.0
Tags: linq, C#
LINQ | C#
by Mikael Henriksson
18. March 2010 04:27
This is a very naive and silly attempt but it’s working. I suppose under high work load and supporting many databases I guess you need to shield the web servers from having to host too many SessionFactories. This was the simplest way I could think of. I am actually getting the connection string as ...
[More]
by Mikael Henriksson
16. February 2010 08:42
I have created a few very useful extension methods for handling the System.Xml.Linq namespace that I use all the time. I’ve had positive feedback on this before (and it showed up in this post) and now I had to create a couple of extra extensions just to make my life even easier. The way I work...
[More]
by Mikael Henriksson
14. February 2010 01:23
I have a service that sends our application to customers based on various criteria's. I want to verify the most important parameters and to do that I of course need to copy the whole darn folder structure to the directory the tests are run from to simulate the web client.
To please both Team City a...
[More]
30118008-19fd-4313-a72f-fe6317d7ecb7|0|.0
Tags: c#
C#
by Mikael Henriksson
13. February 2010 16:12
It is actually really simple and I have to thank my boss, DBA and friend Fridthjof for that. If you ever thought it is difficult to work with a DBA then imagine having one as your boss! *joke* He’s a great guy and as a DBA he is actually very understanding and I have been able to ...
[More]
by Mikael Henriksson
6. February 2010 16:43
I sometimes have to test outgoing messages before we send them out. Since we work in the mobile industry we need to communicate with mobile phones and alas most countries have legal requirements that we much abide to. Because of some Swedish and Norwegian characters like “åäö&r...
[More]
by Mikael Henriksson
8. May 2009 00:13
By coincidence I found something called Fluent NHibernatewow automatic mappings etc. After having a read up on NHibernateI also found something called NHibernate Validationthat seemed to serve my purposes well. The only reason for having a look around was to easily add validation to my classes. I fo...
[More]