I don’t know how to save object with where clause. I need it to prevent saving object with range of dates overlapping on others.
public class TaskEvent
{
public DateTime StartDate {get;set;}
public DateTime EndDate {get;set;}
}
I want to check overlaping in criteria within saving operation but I don’t know how.
Any ideas?
You can use HQL for ad hoc update queries
or to do in a more NHibernate kind of way…fetch the required TaskEvents(where clause), update their properties, and commit the transaction.