public RESULT GetValue <RESULT, Entity>(IFieldInfo field, IConnectinContext cc, params string[] orderby) where Entity : Mappings.DataObject { Command cmd = Command.GetThreadCommand(); ObjectMapper om = ObjectMapper.GetOM(typeof(Entity)); 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.GetValue <RESULT>(cmd)); }