Arrange game read service
All checks were successful
Game Ideas build for PR / build_blazor_app (pull_request) Successful in 37s
All checks were successful
Game Ideas build for PR / build_blazor_app (pull_request) Successful in 37s
This commit is contained in:
@@ -85,13 +85,11 @@ public class GameReadService(GameIdeasContext context, IMapper mapper) : IGameRe
|
||||
|
||||
query = query
|
||||
.Where(game => keywords.All(
|
||||
kw => game.Title.IndexOf(kw, StringComparison.OrdinalIgnoreCase) >= 0
|
||||
kw => game.Title.Contains(kw, StringComparison.OrdinalIgnoreCase)
|
||||
))
|
||||
.OrderBy(game =>
|
||||
keywords.Min(kw =>
|
||||
.OrderBy(game => keywords.Min(kw =>
|
||||
game.Title.IndexOf(kw, StringComparison.OrdinalIgnoreCase)
|
||||
)
|
||||
)
|
||||
))
|
||||
.ThenBy(game => game.Title.Length);
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user