Add name to backtest filters

This commit is contained in:
2025-10-14 18:38:27 +07:00
parent 74adad5834
commit a462fc9948
6 changed files with 32 additions and 2 deletions

View File

@@ -395,6 +395,11 @@ public class PostgreSqlBacktestRepository : IBacktestRepository
if (filter != null)
{
if (!string.IsNullOrWhiteSpace(filter.NameContains))
{
var nameLike = $"%{filter.NameContains.Trim()}%";
baseQuery = baseQuery.Where(b => EF.Functions.ILike(b.Name, nameLike));
}
if (filter.ScoreMin.HasValue)
baseQuery = baseQuery.Where(b => b.Score >= filter.ScoreMin.Value);
if (filter.ScoreMax.HasValue)