From 87bc2e9dceaa4be010ebdf1430d4ee8e70b1e720 Mon Sep 17 00:00:00 2001 From: cryptooda Date: Fri, 12 Dec 2025 01:44:34 +0700 Subject: [PATCH] Enhance PostgreSqlBacktestRepository to include PositionCount in backtest mappings - Updated the mapping logic in multiple methods to include PositionCount alongside existing fields such as NetPnl, Score, and InitialBalance. --- .../PostgreSql/PostgreSqlBacktestRepository.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBacktestRepository.cs b/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBacktestRepository.cs index 85faf24f..c3580e05 100644 --- a/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBacktestRepository.cs +++ b/src/Managing.Infrastructure.Database/PostgreSql/PostgreSqlBacktestRepository.cs @@ -193,7 +193,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository Score = entity.Score, ScoreMessage = entity.ScoreMessage ?? string.Empty, InitialBalance = entity.InitialBalance, - NetPnl = entity.NetPnl + NetPnl = entity.NetPnl, + PositionCount = entity.PositionCount }); return (mappedBacktests, totalCount); @@ -269,7 +270,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository Score = entity.Score, ScoreMessage = entity.ScoreMessage ?? string.Empty, InitialBalance = entity.InitialBalance, - NetPnl = entity.NetPnl + NetPnl = entity.NetPnl, + PositionCount = entity.PositionCount }); return (mappedBacktests, totalCount); @@ -590,7 +592,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository Score = entity.Score, ScoreMessage = entity.ScoreMessage ?? string.Empty, InitialBalance = entity.InitialBalance, - NetPnl = entity.NetPnl + NetPnl = entity.NetPnl, + PositionCount = entity.PositionCount }); return (mappedBacktests, totalCount); @@ -732,7 +735,8 @@ public class PostgreSqlBacktestRepository : IBacktestRepository Score = entity.Score, ScoreMessage = entity.ScoreMessage ?? string.Empty, InitialBalance = entity.InitialBalance, - NetPnl = entity.NetPnl + NetPnl = entity.NetPnl, + PositionCount = entity.PositionCount }); return (mappedBacktests, totalCount);