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
Post a Comment