Delete backtest by request id

This commit is contained in:
2025-07-18 19:34:16 +07:00
parent cb031522b4
commit fd117f9a2f
5 changed files with 39 additions and 1 deletions

View File

@@ -552,6 +552,20 @@ namespace Managing.Application.Backtesting
}
}
public bool DeleteBacktestsByRequestId(string requestId)
{
try
{
_backtestRepository.DeleteBacktestsByRequestId(requestId);
return true;
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to delete backtests for request ID {RequestId}", requestId);
return false;
}
}
public (IEnumerable<LightBacktest> Backtests, int TotalCount) GetBacktestsByUserPaginated(User user, int page,
int pageSize, string sortBy = "score", string sortOrder = "desc")
{