code_junkie

NHibernate - how to save object with where clause

Nov 12th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public class TaskEvent
  2. {
  3. public DateTime StartDate {get;set;}
  4. public DateTime EndDate {get;set;}
  5. }
  6.  
  7. session.CreateQuery("UPDATE TaskEvent SET ... WHERE ID = :ID and ...")
  8. .SetInt32("ID", ID)
  9. //.SetDateTime("", )
  10. //.SetDateTime("", )
  11. .ExecuteUpdate();
Add Comment
Please, Sign In to add comment