Modified repository layer to  use ICriteria.