clearing a table using NHibernate

Skip to first unread message

Sean Farrow

unread,
May 16, 2013, 1:48:11 AM5/16/13
to nhu...@googlegroups.com

Hi,

 

What’s the easiest way of clearing a table off all its records using NHibernate?

Any help appreciated.

Cheers

Sean.

Pete Appleton

unread,
May 16, 2013, 7:42:15 AM5/16/13
to nhu...@googlegroups.com

HQL, I'm afraid -

 

session.CreateQuery("delete from Entity").ExecuteUpdate();

 

/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 nhusers+u...@googlegroups.com.
To post to this group, send email to nhu...@googlegroups.com.
Visit this group at http://groups.google.com/group/nhusers?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages