Refactor code to .NET8
This commit is contained in:
@@ -26,7 +26,7 @@ public class T4R2Processor
|
||||
{
|
||||
var year = int.Parse(processWorker.Records?.SingleOrDefault(x => x.Code == "Year")?.Desc1!);
|
||||
var sources = processWorker.Records?.Where(x => x.Code == "Source").ToList();
|
||||
if (!sources!.Any())
|
||||
if (sources!.Count == 0)
|
||||
{
|
||||
throw new Exception("Source record not found");
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class T4R2Processor
|
||||
|
||||
var newRecords = new List<Record>();
|
||||
|
||||
foreach (var source in sources!)
|
||||
foreach (var source in sources)
|
||||
{
|
||||
var rawSourceCodes = processWorker.Records?.SingleOrDefault(x => x.Code == $"Codes-{source.Desc1}")
|
||||
?.Desc1;
|
||||
|
||||
Reference in New Issue
Block a user