This project is read-only.
1

Closed

Mapping Error

description

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
Closed Aug 13, 2011 at 3:03 PM by Throb

comments

wrote Aug 13, 2011 at 3:03 PM

Resolved with changeset 61362.

Throb wrote Aug 13, 2011 at 3:27 PM

Tx for reporting. :-) Mapper was getting confused because new way of registering was finding generic specializations instead of generic type definitions... Fixed.

wrote Feb 14, 2013 at 2:41 AM

wrote May 16, 2013 at 5:55 AM