I know this should be simple, but I seem to be being brain-dead today...
given some entity Foo, how can I write a QueryOver that translates into
the following SQL:
select case
when exists (select 1 from FooTable where Name='some
name') then 1
else 0
end
I.E. - I want to be able to determine in code if the entity already
exists; counting them would be trivial, but I don't want to do that
because there could be a lot and it's a significant amount of
unnecessary work for the DB. The inner subquery is easy enough - how do
I generate the outer query though, which doesn't have a 'from'
statement?
Thanks,
/Pete
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.