Production Approvals,

sql client refactoring
This commit is contained in:
Stoyan Zlatev
2023-04-14 16:45:41 +02:00
parent df43169f79
commit cf9dfe1915
26 changed files with 546 additions and 166 deletions
@@ -10,9 +10,9 @@
public class ReportService : IReportService
{
private readonly IDbContext dbContext;
private readonly ISqlClient dbContext;
public ReportService(IDbContext dbContext)
public ReportService(ISqlClient dbContext)
=> this.dbContext = dbContext;
public HeliumReportModel LoadHeliumPressureReport(HeliumReportModel model = null)
@@ -25,7 +25,7 @@
var where = model.Filter.Where();
var orderBy = model.Filter.OrderBy();
model.Items = this.dbContext.AsEnumerable($@"
model.Items = this.dbContext.ExecuteReader($@"
SELECT [PT].[CordonelPressureTest_FertigungsAuftragsNr] AS [FertigungNr] -- 0 Filter
, [POS].[AuftragNr] AS [AuftragNr] -- 1 Filter
, [POS].[PositionNr] AS [PositionNr] -- 2 Filter
@@ -94,7 +94,7 @@
}
public IEnumerable<HeliumPressurePoint> LoadHeliumPressureResults(int testId)
=> this.dbContext.AsEnumerable($@"
=> this.dbContext.ExecuteReader($@"
SELECT [CordonelPressureTestTestPoints_Id]
, [CordonelPressureTest_TestPointNr]
, CAST([CordonelPressureTest_TestPointResult] AS NUMERIC(9, 8))