Ejemplo n.º 1
0
        public IList <RESULT> GetValues <RESULT, Entity>(IFieldInfo field, IConnectinContext cc, Region region, params string[] orderby) where Entity : Mappings.DataObject
        {
            Command      cmd = Command.GetThreadCommand();
            ObjectMapper om  = ObjectMapper.GetOM(typeof(Entity));

            if (DBContext.GetRegionValues == null || !DBContext.GetRegionValues(field, om.Table, cc, region, this, orderby))
            {
                cmd.Text.AppendFormat("select {0} from {1} ", field.Name, om.Table);
                this.Parse(cmd);
                if (orderby != null && orderby.Length > 0)
                {
                    cmd.Text.Append(" Order by ").Append(string.Join(",", orderby));
                }
            }
            return(cc.GetValues <RESULT>(cmd, region));
        }