public static Func<TEntity, TValue> AsGetter<TEntity, TValue>(this MemberInfo mi) { return _memberGetters.GetOrAdd((mi, typeof(Func<TEntity, TValue>)), pair => mi.CompileGetter<TEntity, TValue>()) as Func<TEntity, TValue>; }