code_junkie

Call to Session.CreateSQLQuery ExecuteUpdate fails in NHibernate

Nov 12th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. using(var tx = Session.BeginTransaction()) {
  2. Session
  3. .CreateSQLQuery("exec dbo.spSyncData")
  4. .ExecuteUpdate();
  5. tx.Commit();
  6. }
  7.  
  8. return Session.CreateCriteria(typeof(MyData))
  9. .Add(Restrictions.Eq("Status", Status.Waiting))
  10. .List<MyData>();
Add Comment
Please, Sign In to add comment