コード例 #1
0
        public MemberConfigurationEntityCacheExpression <TSource, TDestination, TMember, TKey, TEntity> Entity <TEntity>()
            where TEntity : class, TMember
        {
            var resolver =
                new EntityCacheMemberValueResolver <TSource, TDestination, TKey, TMember, TEntity>(x => x);

            _memberConfigurationExpression.MapFrom(resolver, _sourceKeyMember);

            return(new MemberConfigurationEntityCacheExpression <TSource, TDestination, TMember, TKey, TEntity>(
                       resolver));
        }
コード例 #2
0
        Entity <TEntity>() where TEntity : class, TDestination
        {
            var resolver =
                new EntityCacheMemberValueResolver <TSource, TDestination, TKey, TDestination, TEntity>(
                    x => x);

            var action = _sourceKeyMember.Compile();

            _mappingExpression.ConvertUsing((src, dest, rc) => resolver.Resolve(src, dest, action(src), dest, rc));

            return(new MemberConfigurationEntityCacheExpression <TSource, TDestination, TDestination, TKey, TEntity>(
                       resolver));
        }
コード例 #3
0
 public MemberConfigurationEntityCacheExpression(
     EntityCacheMemberValueResolver <TSource, TDestination, TKey, TMember, TEntity> resolver)
 {
     _resolver = resolver;
 }