|
@@ -84,9 +84,9 @@ namespace GxPress.Repository.Implement
|
|
|
if (!string.IsNullOrEmpty(request.Keyword))
|
|
|
{
|
|
|
var like = $"%{request.Keyword}%";
|
|
|
- query.WhereLike(nameof(Article.Title), like)
|
|
|
- .OrWhereLike(nameof(Article.Author), like)
|
|
|
- .OrWhereLike(nameof(Article.Source), like);
|
|
|
+ query.Where(n => n.WhereLike(nameof(Article.Title), like)
|
|
|
+ .OrWhereLike(nameof(Article.Author), like)
|
|
|
+ .OrWhereLike(nameof(Article.Source), like));
|
|
|
}
|
|
|
|
|
|
if (request.GroupId > 0)
|
|
@@ -201,9 +201,9 @@ namespace GxPress.Repository.Implement
|
|
|
if (!string.IsNullOrEmpty(keyword))
|
|
|
{
|
|
|
var like = $"%{keyword}%";
|
|
|
- query.WhereLike(nameof(Article.Title), like)
|
|
|
- .OrWhereLike(nameof(Article.Author), like)
|
|
|
- .OrWhereLike(nameof(Article.Source), like);
|
|
|
+ query.Where(n => n.WhereLike(nameof(Article.Title), like)
|
|
|
+ .OrWhereLike(nameof(Article.Author), like)
|
|
|
+ .OrWhereLike(nameof(Article.Source), like));
|
|
|
}
|
|
|
pagedList.Total = await _repository.CountAsync(query);
|
|
|
|