c# - truncate or delete all data in table with NHibernate -


with nhibernatesession.delete(entity); can delete entity. how can truncate or delete data in table nhibernate.

i can hql like: session.createquery ( "truncate tablename"). executeupdate () there other options?

batch, data oriented operations not nhibernate intended for. use session.createsqlquery() , specify whatever sql under normal situations. however, should consider whether need use nhibernate particular task - doesn't make sense to.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -