Example #1
0
 protected SelectJoinBase(DataContext context, LambdaExpression expression, List <IJoinModel> models, List <IMap> maps)
 {
     Models      = models;
     _context    = context;
     Mapping     = MultiDataDynamicMapping.CreateMultiDataDynamicMapping(typeof(K), Models);
     _expression = expression;
     _maps       = maps;
 }
Example #2
0
        public static MultiDataDynamicMapping CreateMultiDataDynamicMapping(Type type, List <IJoinModel> models)
        {
            var array = new Tuple <string, IJoinTableMapping> [models.Count];

            for (var i = 0; i < models.Count; i++)
            {
                var model = models [i];
                var tuple = new Tuple <string, IJoinTableMapping> (model.AliasTableName, model.JoinMapping);
                array [i] = tuple;
            }
            var mapping = new MultiDataDynamicMapping(type, array);

            return(mapping);
        }