I want to apply a condition, after I passed another condition like this:
List<Entity> GetByCondition()
{
If(dateConditionEnabled)
{
Repository.Get(i=>i.start<=datetime.Now && i.EndDate<=DateTime.Now);
}
else
{
Repository.Get();
}
}
I want to apply "If" condition, in the lambda I used in Get method.
Any idea?
-Regards