#henrik

development and technology stuff

IE8 accelerators

A really nice feature of IE8. Also rather simple to implement your own. I've just made a simple example to translate selected words with my favorite site http://www.leo.org. Check it out >> leo accelerator Install it in Internet Explorer - install page.

Filed under  //   Other   internet explorer   xml  
Posted May 30, 2009

NHibernate Transformers

NHibernate is awesome. I'm using it for the first time in a ASP.NET project. Today I found a nice feature in combination with native SQL queries. One can return unmanaged entities for a native SQL query - with automatic mapping - excellent! See the documentation on using Transformers: (NHibernate native SQL queries)

sess.CreateSQLQuery("SELECT name, birthdate FROM CATS")
        .SetResultTransformer(Transformers.AliasToBean(typeof(CatDTO)))

public class CatDTO {
    public string Name {
        get {}
        set {}
    }
    public DateTime Birthdate {
        get {}
        set {}
    }
}

Just create Properties using the same name as the columns of the query in the POCO and you're done. And the extra nice thing. Exactly the same approach in the original Java version (Hibernate native SQL queries).

Filed under  //   Development   NHibernate   Other   c#  

It's alive

There you go - my blog is finally there. I will use this blog for technology related things at the company I work for (PALFINGER) or which I find interresting. So let the fun begin ..

Filed under  //   Other