alkampfer on September 1st, 2010

NHQueryAnalyzer is a tool originally written by Ayende, and now it is supported at this link. I think that it is really a good tool, very useful even to learn HQL query because gives you an immediate idea of what the query will looks like. Here is a screenshot. (‘I’ve hide some sensitive part because [...]

Continue reading about NHibernate Query Analyzer

alkampfer on August 11th, 2010

 

If you does not know Query only properties of NHibernate you better take a look to this post, I must admit that they are really useful to make simpler query without changing the object model. I’ve this object model

This is how the domain was build, we decided to set a IList<DomainRegistrations> in the NickName [...]

Continue reading about Nhibernate query only properties and many-to-one

alkampfer on August 5th, 2010

I’m optimizing a little bit an application, it is a windows form client that communicates with a WCF service. A specific form is really slow to open, so I decided to measure with a profiler to understand if something could be optimized with a little effort.
It turns out to me that 99% of form starting [...]

Continue reading about When you use an ORM always use projection when needed

alkampfer on August 2nd, 2010

In a thread of Guisa (Italian language), a user poses a question, he works with a legacy db, he has Foo and Bar entities with id of different type, one is string and another one is Integer. The two entities implements a common interface (IItemContent), and he want to be able to create an entity [...]

Continue reading about Link an entity to a hierarchy with different Id type

DateTime values are one of the most feared type of data to store in database. Suppose you have an entity with a datetime Property, and you want to do a standard report finding the count of each entity for each day in a date range, if you groupBy the DateTime property, surely you will get [...]

Continue reading about NHibernate HQL query with only date part of a datetimevalue