@@ -69,29 +69,6 @@ public static bool IsNot<T>(this Nullable<T> This, Nullable<T> other = null)
6969
7070 public static partial class SqlQuery
7171 {
72- public static IEnumerable < IReadOnlyList < IResultSetValue > > Query ( this IDatabaseConnection This , ISqlQuery query )
73- {
74- Contract . Requires ( This != null ) ;
75- Contract . Requires ( query != null ) ;
76- return This . Query ( query . ToString ( ) ) ;
77- }
78-
79- public static IEnumerable < IReadOnlyList < IResultSetValue > > Query (
80- this IDatabaseConnection This , ISqlQuery query , params object [ ] values )
81- {
82- Contract . Requires ( This != null ) ;
83- Contract . Requires ( query != null ) ;
84- Contract . Requires ( values != null ) ;
85- return This . Query ( query . ToString ( ) , values ) ;
86- }
87-
88- public static IStatement PrepareStatement ( this IDatabaseConnection This , ISqlQuery query )
89- {
90- Contract . Requires ( This != null ) ;
91- Contract . Requires ( query != null ) ;
92- return This . PrepareStatement ( query . ToString ( ) ) ;
93- }
94-
9572 public static FromClause < T > From < T > ( )
9673 {
9774 var typ = typeof ( T ) ;
@@ -192,30 +169,5 @@ private static string GetSqlName(Expression prop)
192169 throw new NotSupportedException ( "Cannot get SQL for: " + n ) ;
193170 }
194171 }
195-
196- private static Tuple < string , bool > CompileOrderByExpression < T , TValue > ( this Expression < Func < T , TValue > > orderExpr , bool asc )
197- {
198- var lambda = orderExpr ;
199-
200- MemberExpression mem = null ;
201-
202- var unary = lambda . Body as UnaryExpression ;
203- if ( unary != null && unary . NodeType == ExpressionType . Convert )
204- {
205-
206- mem = unary . Operand as MemberExpression ;
207- }
208- else
209- {
210- mem = lambda . Body as MemberExpression ;
211- }
212-
213- if ( mem != null && ( mem . Expression . NodeType == ExpressionType . Parameter ) )
214- {
215- return Tuple . Create ( ( ( PropertyInfo ) mem . Member ) . GetColumnName ( ) , asc ) ;
216- }
217-
218- throw new NotSupportedException ( "Order By does not support: " + orderExpr ) ;
219- }
220172 }
221173}
0 commit comments