Monthly Archives: April 2009

First trip to Silicon Valley

In summer 2008 me and three friends representing Hungary as team DigitalMania took part in the Microsoft Imagine Cup competiton in the software design category – one of the largest student technology competitons in the world. The task was to design an implement a solution regarding an environmental issue. We focused on the water problem and created the prototype of a system that aimed to reduce water used for irrigation by taking account various factors such as soil moisture, weather forecasts and custom user defined rules. We used custom hardware (controlling the pipes) and .NET, ASP.NET and Silverlight to for the user interface while developing the solution.


To test how the system would work in real life we first constructed a mathematical simulation and – after we’ve calculated that savings would be 10-15% even to the soil mositure monitoring system and far more for automatic systems we built a simulation table to monitor and demonstrate the same think in a micro environment.

Read More…

CMS Vendor Meme – the Sense/Net Response

About two weeks ago ECMS vendor Day started off a smaller lavina in the CMS vendor blogosphere by completing the reality checklist published by CMS Watch and tagged some other vendor to have them complete it as well.

As of now more than 20 vendors have completed this checklist. Even though Sense/Net was not tagged once we heard of this meme, we decided to fill out the test and evaluate ourselves as well. You can see the Sense/Net CMS Vendor meme results here.

Querying many-to-many relations in NHibernate

Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h04/mnt/50561/domains/ on line 76

I’ve ran into a querying scenario with NHibernate that was much less obvious to solve with the NHibernate query API than it would have been with SQL – for me at least.

In my model I’ve had a simple many-to-many relation: Entries that had multiple Categories each and Categories that belonged to multiple Entries as well.

Categories and Entries: an Entity-Relationship Diagram

Categories and Entries: a many-to-many relationship

In the underlying SQL model the many-to-many relationship was implemented via a relationship table:

Many-to-many relationship table structure

Categories and Entries table structure

Now I wanted to find all entites within a given category. Pretty simple, right? In SQL it would have been a simple join:

SELECT Entry.* FROM Entry JOIN Category_rel_Entry ON Category_rel_Entry.Entry_ID = Entry.ID WHERE Category_rel_Entry.Category_ID = @CategoryId

In Nhibernate this query is a bit more tricky, let me share how it can be done.

Note: this post is also a good example of how to define a many to many relationship schema in NHibernate.

Read More…

 Scroll to top