mirror of
https://github.com/Biarity/Sieve.git
synced 2025-10-22 05:15:30 +02:00
Fix for Issue #19
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user