I have a table(InquiryTable) and first of all I select some records from it, after I extract these records from database, I update them into database. but I need to know how I can do these two commands simultaneously(merge them in one) by nhibernate.
inquiry = Session.Query<InquiryTable>().Where((c => c.ID == ID)).ToList();
inquiry.FirstOrDefault().Time= sendTime;
Session.Update(inquiry);
I want to merge Session.Query and Session.Update in one command. It means that I need an update with where in same query.
What would fit to this concept is NHiberante DML
This feature set is not built on top of
ICriteriaorQueryOver, but it does use HQL.An example from the doc, doing the UPDATE on filtered data in one shot:
See also: