Skip to content

Commit c1cc6c0

Browse files
BaronAdamJamess-Lucass
authored andcommitted
Bug fixes in QueryableExtensions (#74)
1 parent 2d4494c commit c1cc6c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Extensions/QueryableExtension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ public static (IQueryable, int?) Apply<T>(this IQueryable<T> queryable, Query qu
4444
where.Append($" {prev.Trim()} ");
4545
}
4646

47-
var property = opts[0];
47+
var property = opts[0].Replace("\'", string.Empty);
4848
var operand = opts[1];
4949
var value = opts[2].Replace("'", "\"");
5050

51-
string? propertyName = typeof(T).GetProperties().FirstOrDefault(x => x.GetCustomAttribute<JsonPropertyNameAttribute>()?.Name == property)?.Name;
51+
string? propertyName = typeof(T).GetProperties().FirstOrDefault(x => x.Name == property)?.Name;
5252

5353
if (!string.IsNullOrEmpty(propertyName))
5454
{

0 commit comments

Comments
 (0)