I am trying to do condition by comparing between dates. My class variables are like this is like this
public class SVCSpecialSchedule : BaseAuditEntity
{
public virtual int ID { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual IList<SVCSpecialScheduleList> SpecialScheduleList { get; set; }
public virtual IList<SpecialScheduleAssignment> SpecialScheduleAssignment { get; set; }
}
Now my Linq Query is below .
return _session.QueryOver<SVCSpecialSchedule>().Where
(sg => (sg.LastModifiedTimeStamp >= startDate
&& sg.LastModifiedTimeStamp <= endDate)
|| (sg.SpecialScheduleList.Any(ssl => ssl.LastModifiedTimeStamp >= startDate
&& ssl.LastModifiedTimeStamp <= endDate)
)
.List();
Now i am facing an issue like below
System.Exception HResult=0x80131500 Message=Unrecognised method call: System.Linq.Enumerable:Boolean Any[SVCSpecialScheduleList](System.Collections.Generic.IEnumerable
1[ServicesDomainModel.BOS.MerchandiseManagement.SVCSpecial.SVCSpecialScheduleList], System.Func
2[ServicesDomainModel.BOS.MerchandiseManagement.SVCSpecial.SVCSpecialScheduleList,System.Boolean]) Source=NHibernate
User contributions licensed under CC BY-SA 3.0