Exemple #1
0
        private MapRule <TRootEntity, TRootEntity> CreateMapRule()
        {
            MapRule <TRootEntity, TRootEntity> mapRule = new MapRule <TRootEntity, TRootEntity>(_queryOptions, x => x);

            _mapRuleBasicList.Add(mapRule.GetMapRuleBasic());

            return(mapRule);
        }
Exemple #2
0
        public IMapRule <TRootEntity, TEntity> ToOne <TEntity>(Expression <Func <TRootEntity, TEntity> > target) where TEntity : class
        {
            if (target == null)
            {
                throw new ArgumentException($"[Expression<Func<{typeof(TRootEntity).Name}, {typeof(TRootEntity).Name}>>>] {nameof(target)} is null.");
            }

            MapRule <TRootEntity, TEntity> mapRule = new MapRule <TRootEntity, TEntity>(_queryOptions, target);

            _mapRuleBasicList.Add(mapRule.GetMapRuleBasic());

            return(mapRule);
        }