Hi Throb,
With the latest version, i have problem with a mapping.
public static partial class ObjectVersionHelper
{
[ExpressionObserverMapping(typeof (Observable))]
public static T GetLastVersionAtDate<T>(this IEnumerable<T> enumerable, DateTime dateTime) where T : IObjectVersion
{
if (enumerable == null) return default(T);
return enumerable.Where(ta => ta.VersionDate.Date <= dateTime.Date).OrderByDescending(ov => ov.VersionDate).FirstOrDefault();
}
}
public static partial class ObjectVersionHelper
{
#region Nested type: Observable
public static class Observable
{
public static IValueProvider<T> GetLastVersionAtDate<T>(IEnumerable<T> enumerable, DateTime dateTime) where T : IObjectVersion
{
return enumerable.Where(ta => ta.VersionDate.Date <= dateTime.Date).OrderByDescending(ov => ov.VersionDate.Date).FirstOrDefault();
}
}
}
Have you an idea ?
Vincent
With the latest version, i have problem with a mapping.
public static partial class ObjectVersionHelper
{
[ExpressionObserverMapping(typeof (Observable))]
public static T GetLastVersionAtDate<T>(this IEnumerable<T> enumerable, DateTime dateTime) where T : IObjectVersion
{
if (enumerable == null) return default(T);
return enumerable.Where(ta => ta.VersionDate.Date <= dateTime.Date).OrderByDescending(ov => ov.VersionDate).FirstOrDefault();
}
}
public static partial class ObjectVersionHelper
{
#region Nested type: Observable
public static class Observable
{
public static IValueProvider<T> GetLastVersionAtDate<T>(IEnumerable<T> enumerable, DateTime dateTime) where T : IObjectVersion
{
return enumerable.Where(ta => ta.VersionDate.Date <= dateTime.Date).OrderByDescending(ov => ov.VersionDate.Date).FirstOrDefault();
}
}
}
Have you an idea ?
Vincent