Hi Michael,

I think the syntax you'd want for QueryOver is:

var entity =
    Repository.Session
        .QueryOver<ToyBox>()
            .Where(tb => tb.GetType() == typeof(Circle))
            .SingleOrDefault();

  2-I dont like your QueryOver query Where(x => x.Shape == new Circle { Id = 1 
})) ... Its feel just wrong. 

               var entity = Repository.Session.QueryOver<ToyBox>()
                   .Where(x => x.Shape == new Circle { Id =
    1 }).SingleOrDefault();

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to