Fix for Issue #19

This commit is contained in:
David Bond
2018-05-15 00:34:37 +01:00
parent afbd41e090
commit 204a1b55e2
39 changed files with 379 additions and 504 deletions

View File

@@ -1,17 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Sieve.Extensions
{
public static partial class LinqExtentions
public static partial class LinqExtentions
{
public static IQueryable<TEntity> OrderByDynamic<TEntity>(this IQueryable<TEntity> source, string orderByProperty,
bool desc, bool useThenBy)
{
string command = desc ?
string command = desc ?
( useThenBy ? "ThenByDescending" : "OrderByDescending") :
( useThenBy ? "ThenBy" : "OrderBy");
var type = typeof(TEntity);