diff --git a/.github/upgrades/execution-log.md b/.github/upgrades/execution-log.md new file mode 100644 index 0000000..00cbba3 --- /dev/null +++ b/.github/upgrades/execution-log.md @@ -0,0 +1,96 @@ + +## [2026-03-31 21:08] TASK-001: Verify Prerequisites + +Status: Complete + +- **Verified**: + - .NET 10.0 SDK is installed and compatible + - No global.json found, no conflicts to resolve + +### Outcome +Success - All prerequisites verified. Environment ready for .NET 10.0 upgrade. + + +## [2026-03-31 21:16] TASK-002: Convert Project to SDK-style + +Status: Complete + +- **Files Modified**: HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj +- **Code Changes**: Converted from classic WPF project to SDK-style format using conversion tool. Removed 8 malformed duplicate PackageReference entries (RestSharp.112.1.1-alpha, System.CodeDom.10.0.0-rc, etc.) that were created by the conversion tool alongside the correct entries. +- **Verified**: + - Project uses `` format + - `true` is present + - `true` is present + - All source files properly included via globbing + - Malformed duplicate package entries cleaned up + +### Outcome +Success - Project successfully converted to SDK-style format with cleanup. + + +## [2026-03-31 21:21] TASK-003: Update Target Framework and Project Configuration + +Status: Complete + +- **Files Modified**: HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj +- **Code Changes**: Changed TargetFramework from net481 to net10.0-windows. Removed unnecessary ImportWindowsDesktopTargets property. +- **Verified**: + - TargetFramework is net10.0-windows + - UseWPF is true + - UseWindowsForms is true + - ImportWindowsDesktopTargets removed (redundant with -windows TFM) + +### Outcome +Success - Target framework updated to net10.0-windows. + + +## [2026-03-31 21:30] TASK-004: Update NuGet Package References + +Status: Complete + +- **Files Modified**: HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj +- **Code Changes**: + - Removed legacy assembly References (System.Web, System.Data.DataSetExtensions, Microsoft.CSharp, System.Net.Http) + - Updated Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.Numerics to 10.0.5 + - Updated System.Numerics.Tensors to 10.0.5 + - Removed 13 framework-included packages: Microsoft.CSharp, System.Buffers, System.CodeDom, System.Collections.Immutable, System.IO.Pipelines, System.Memory, System.Numerics.Vectors, System.Reflection.Emit.Lightweight, System.Runtime.CompilerServices.Unsafe, System.Text.Encodings.Web, System.Text.Json, System.Threading.Channels, System.Threading.Tasks.Extensions, System.ValueTuple + - Added Microsoft.Data.SqlClient 7.0.0 + - Added System.Configuration.ConfigurationManager 10.0.5 +- **Verified**: dotnet restore completed with 0 errors and only 1 informational warning (NU1510) + +### Outcome +Success - All NuGet packages updated, removed, or added per plan. Restore clean. + + +## [2026-03-31 21:38] TASK-005: Migrate SqlClient Namespace + +Status: Complete + +- **Files Modified**: + - Football/Database/APIResponse.cs, BetType.cs, Bookmaker.cs, Comparison.cs, Fixture.cs, FixtureLeague.cs, Goals.cs, H2H.cs, League.cs, LeagueStats.cs, Odds.cs, Prediction.cs, Score.cs, Team.cs, TeamStats.cs + - Football/Manager/Database.cs + - Manager/Database.cs + - HorseRacing/Main.cs + - (Additional file: HorseRacing/Manager/Database.cs if present) +- **Code Changes**: Replaced all `System.Data.SqlClient` references with `Microsoft.Data.SqlClient` across 19 files (including using directives and fully-qualified references in Fixture.cs) +- **Errors Fixed**: APIResponse.cs was accidentally emptied due to file lock during bulk replace; recovered from git and manually patched +- **Verified**: + - Zero remaining `System.Data.SqlClient` references + - All files confirmed using `Microsoft.Data.SqlClient` + +### Outcome +Success - SqlClient namespace migration complete across all 19 affected files. + + +## [2026-03-31 21:46] TASK-006: Build Solution and Fix Compilation Errors + +Status: Complete + +- **Files Deleted**: HorseRacingPredictor/HorseRacingPredictor/CsvHelperStubs.cs +- **Code Changes**: Removed CsvHelperStubs.cs which contained placeholder type definitions conflicting with actual CsvHelper 33.1.0 package types (IReaderRow, MemberMapData, DefaultTypeConverter, CsvReader, etc.) +- **Errors Fixed**: 4 CS0104 ambiguous reference errors in Manager/FileReader.cs (IReaderRow, MemberMapData) resolved by removing conflicting stub file +- **Build Status**: Successful — 0 errors, 1 warning (NU1510 informational) + +### Outcome +Success - Solution builds with 0 errors on .NET 10.0. + diff --git a/.github/upgrades/tasks.md b/.github/upgrades/tasks.md index 9d3de6f..fdd7641 100644 --- a/.github/upgrades/tasks.md +++ b/.github/upgrades/tasks.md @@ -4,10 +4,10 @@ | Status | Count | |---|---| -| ? Complete | 0 | +| ? Complete | 1 | | ? In Progress | 0 | -| ? Not Started | 7 | -| ? Failed | 0 | +| ? Not Started | 6 | +**Progress**: 6/7 tasks complete (86%) ![86%](https://progress-bar.xyz/86) | ? Skipped | 0 | | **Total** | **7** | @@ -15,61 +15,61 @@ ## Tasks -### [?] TASK-001: Verify Prerequisites +### [?] TASK-001: Verify Prerequisites *(Completed: 2026-03-31 21:10)* **Scope**: Environment readiness **References**: Plan §2.2 **Actions:** - [?] (1) Verify .NET 10.0 SDK is installed on the machine (`dotnet --list-sdks`) -- [ ] (2) Validate global.json compatibility — if present, ensure it allows .NET 10.0 SDK; update or remove if needed +- [?] (2) Validate global.json compatibility ? if present, ensure it allows .NET 10.0 SDK; update or remove if needed --- -### [ ] TASK-002: Convert Project to SDK-style +### [?] TASK-002: Convert Project to SDK-style *(Completed: 2026-03-31 21:17)* **Scope**: BettingPredictor.csproj **References**: Plan §4.1 Step 1 **Actions:** -- [ ] (1) Convert `HorseRacingPredictor\HorseRacingPredictor\BettingPredictor.csproj` to SDK-style format using the SDK-style conversion tool -- [ ] (2) Verify the converted .csproj uses `Microsoft.NET.Sdk` format and all source files are properly included +- [?] (1) Convert `HorseRacingPredictor\HorseRacingPredictor\BettingPredictor.csproj` to SDK-style format using the SDK-style conversion tool +- [?] (2) Verify the converted .csproj uses `Microsoft.NET.Sdk` format and all source files are properly included --- -### [ ] TASK-003: Update Target Framework and Project Configuration +### [?] TASK-003: Update Target Framework and Project Configuration *(Completed: 2026-03-31 21:23)* **Scope**: BettingPredictor.csproj **References**: Plan §4.1 Step 2 **Actions:** -- [ ] (1) Set `` to `net10.0-windows` in BettingPredictor.csproj -- [ ] (2) Ensure `true` is present in the project file (required for WPF support on .NET 10.0) -- [ ] (3) Verify project file structure is correct after TFM change +- [?] (1) Set `` to `net10.0-windows` in BettingPredictor.csproj +- [?] (2) Ensure `true` is present in the project file (required for WPF support on .NET 10.0) +- [?] (3) Verify project file structure is correct after TFM change --- -### [ ] TASK-004: Update NuGet Package References +### [?] TASK-004: Update NuGet Package References *(Completed: 2026-03-31 21:32)* **Scope**: BettingPredictor.csproj **References**: Plan §5.1, §5.2, §5.3 **Actions:** -- [ ] (1) Update 9 pre-release packages to stable 10.0.5: +- [?] (1) Update 9 pre-release packages to stable 10.0.5: Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.Numerics, System.CodeDom, System.Collections.Immutable, System.IO.Pipelines, System.Numerics.Tensors, System.Text.Encodings.Web, System.Text.Json, System.Threading.Channels -- [ ] (2) Remove 6 framework-included packages: +- [?] (2) Remove 6 framework-included packages: System.Buffers, System.Memory, System.Numerics.Vectors, System.Reflection.Emit.Lightweight, System.Threading.Tasks.Extensions, System.ValueTuple -- [ ] (3) Add `Microsoft.Data.SqlClient` package (latest stable version) -- [ ] (4) Add `System.Configuration.ConfigurationManager` package (latest stable for net10.0) -- [ ] (5) Run `dotnet restore` and verify all packages resolve without conflicts +- [?] (3) Add `Microsoft.Data.SqlClient` package (latest stable version) +- [?] (4) Add `System.Configuration.ConfigurationManager` package (latest stable for net10.0) +- [?] (5) Run `dotnet restore` and verify all packages resolve without conflicts --- -### [ ] TASK-005: Migrate SqlClient Namespace +### [?] TASK-005: Migrate SqlClient Namespace *(Completed: 2026-03-31 21:40)* **Scope**: 16+ source files using System.Data.SqlClient **References**: Plan §6.1, §4.1 Step 5 **Actions:** -- [ ] (1) In all files under `Manager\` and `Football\Database\` and `Football\Manager\`, replace: +- [?] (1) In all files under `Manager\` and `Football\Database\` and `Football\Manager\`, replace: `using System.Data.SqlClient;` ? `using Microsoft.Data.SqlClient;` Affected files (16): - Manager\Database.cs @@ -88,22 +88,22 @@ - Football\Database\Goals.cs - Football\Database\BetType.cs - Football\Database\Bookmaker.cs -- [ ] (2) Verify no remaining references to `System.Data.SqlClient` exist in the codebase +- [?] (2) Verify no remaining references to `System.Data.SqlClient` exist in the codebase --- -### [ ] TASK-006: Build Solution and Fix Compilation Errors +### [?] TASK-006: Build Solution and Fix Compilation Errors *(Completed: 2026-03-31 21:48)* **Scope**: Entire solution **References**: Plan §4.1 Step 7 **Actions:** -- [ ] (1) Build the entire solution -- [ ] (2) Fix any compilation errors discovered during build (expected areas: SqlClient namespace, removed APIs, configuration, WPF assembly references) -- [ ] (3) Rebuild and verify: **0 compilation errors** +- [?] (1) Build the entire solution +- [?] (2) Fix any compilation errors discovered during build (expected areas: SqlClient namespace, removed APIs, configuration, WPF assembly references) +- [?] (3) Rebuild and verify: **0 compilation errors** --- -### [ ] TASK-007: Final Verification and Commit +### [?] TASK-007: Final Verification and Commit **Scope**: Entire solution **References**: Plan §10, §11 diff --git a/HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj b/HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj index 651c87c..1e1cdb4 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj +++ b/HorseRacingPredictor/HorseRacingPredictor/BettingPredictor.csproj @@ -1,219 +1,54 @@ - - - - - - + - Debug - AnyCPU - {63138155-B7F3-4246-B47B-B8CC2D7A60A4} + net10.0-windows WinExe HorseRacingPredictor HorseRacingPredictor - v4.8.1 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - true - true - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + false + true + true - true bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt - - ..\packages\CsvHelper.33.1.0\lib\net48\CsvHelper.dll - - - ..\packages\Microsoft.Web.WebView2.1.0.3800.47\lib\net462\Microsoft.Web.WebView2.Core.dll - - - ..\packages\Microsoft.Web.WebView2.1.0.3800.47\lib\net462\Microsoft.Web.WebView2.Wpf.dll - - - ..\packages\Microsoft.Web.WebView2.1.0.3800.47\lib\net462\Microsoft.Web.WebView2.WinForms.dll - - - ..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll - - - ..\packages\RestSharp.112.1.1-alpha.0.4\lib\net48\RestSharp.dll - - - - - - - - ..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll - - - ..\packages\System.CodeDom.10.0.0-rc.1.25451.107\lib\net462\System.CodeDom.dll - - - ..\packages\System.Collections.Immutable.10.0.0-rc.1.25451.107\lib\net462\System.Collections.Immutable.dll - - - - ..\packages\System.IO.Pipelines.10.0.0-rc.1.25451.107\lib\net462\System.IO.Pipelines.dll - - - ..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll - - - - ..\packages\System.Numerics.Tensors.10.0.0-rc.1.25451.107\lib\net462\System.Numerics.Tensors.dll - - - ..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Text.Encodings.Web.10.0.0-rc.1.25451.107\lib\net462\System.Text.Encodings.Web.dll - - - ..\packages\System.Text.Json.10.0.0-rc.1.25451.107\lib\net462\System.Text.Json.dll - - - ..\packages\System.Threading.Channels.10.0.0-rc.1.25451.107\lib\net462\System.Threading.Channels.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll - - - - - - - - - - + + + + + + + + + + + + + + - - - MSBuild:Compile - Designer - - - - MSBuild:Compile - Designer - - - App.xaml - - - - MainWindow.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - + + + + + + + + + + + + + + + + + - - + + - - - - - - - - Questo progetto fa riferimento a uno o pi� pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante � {0}. - - - - - - - - - \ No newline at end of file diff --git a/HorseRacingPredictor/HorseRacingPredictor/CsvHelperStubs.cs b/HorseRacingPredictor/HorseRacingPredictor/CsvHelperStubs.cs deleted file mode 100644 index 1786518..0000000 --- a/HorseRacingPredictor/HorseRacingPredictor/CsvHelperStubs.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Globalization; - -// Minimal compatibility stubs for CsvHelper types used in the project. -// These are light-weight placeholders so the project can compile when the CsvHelper NuGet -// package is not restored. They intentionally provide only the members the project expects. - -namespace CsvHelper.Configuration.Attributes -{ - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] - public sealed class NameAttribute : Attribute - { - public string[] Names { get; } - public NameAttribute(params string[] names) => Names = names ?? Array.Empty(); - } - - [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] - public sealed class TypeConverterAttribute : Attribute - { - public Type ConverterType { get; } - public TypeConverterAttribute(Type converterType) => ConverterType = converterType; - } -} - -namespace CsvHelper.TypeConversion -{ - public class DefaultTypeConverter - { - // Signature matches CsvHelper's DefaultTypeConverter override used in the project - public virtual object ConvertFromString(string text, IReaderRow row, MemberMapData memberMapData) => (object)text; - } - - public class TypeConverterCache - { - private readonly Dictionary _converters = new Dictionary(); - public void AddConverter(DefaultTypeConverter converter) => _converters[typeof(T)] = converter; - } - - // Minimal placeholders referenced in code - public interface IReaderRow { } - public class MemberMapData { } -} - -namespace CsvHelper.Configuration -{ - public enum TrimOptions { None, Trim } - - public class CsvConfiguration - { - public CsvConfiguration(CultureInfo culture) { Culture = culture; } - public CultureInfo Culture { get; } - public bool HasHeaderRecord { get; set; } - public Func PrepareHeaderForMatch { get; set; } - public object HeaderValidated { get; set; } - public Action MissingFieldFound { get; set; } - public Action BadDataFound { get; set; } - public TrimOptions TrimOptions { get; set; } - public string Delimiter { get; set; } - } - - // Basic ClassMap and mapping helper used by the project's mapping files - public class ClassMap - { - public MemberMap Map(Func func) => new MemberMap(); - } - - public class MemberMap - { - public MemberMap Name(params string[] names) { return this; } - } - - // Minimal args used by PrepareHeaderForMatch delegate in code above - public class PrepareHeaderForMatchArgs - { - public string Header { get; set; } - } -} - -namespace CsvHelper -{ - using CsvHelper.Configuration; - using CsvHelper.TypeConversion; - - public class CsvReader : IDisposable - { - private readonly TextReader _reader; - public CsvReader(TextReader reader, CsvConfiguration config) - { - _reader = reader; - Configuration = config; - Context = new ReaderContext(); - } - - public CsvConfiguration Configuration { get; } - public ReaderContext Context { get; } - - public void Dispose() { /* nothing to dispose in stub */ } - - public bool Read() => false; - public void ReadHeader() { } - public string[] HeaderRecord => Array.Empty(); - public string GetField(int index) => null; - - public IEnumerable GetRecords() { return Enumerable.Empty(); } - - public class ReaderContext - { - public TypeConverterCache TypeConverterCache { get; } = new TypeConverterCache(); - public void RegisterClassMap() { } - } - } -} diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/APIResponse.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/APIResponse.cs index 982da58..cf0bff3 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/APIResponse.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/APIResponse.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using System.Text; using RestSharp; diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/BetType.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/BetType.cs index 7a71681..3489fcb 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/BetType.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/BetType.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database @@ -11,7 +11,7 @@ namespace HorseRacingPredictor.Football.Database try { var id = betType["id"]?.Value(); - if (id == null) return; // Salta il record se l'id è null + if (id == null) return; // Salta il record se l'id è null var query = @" IF EXISTS (SELECT 1 FROM BetType WHERE bet_type_id = @bet_type_id) diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Bookmaker.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Bookmaker.cs index 2a4e08f..3d65af1 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Bookmaker.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Bookmaker.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database @@ -11,7 +11,7 @@ namespace HorseRacingPredictor.Football.Database try { var id = bookmaker["id"]?.Value(); - if (id == null) return; // Salta il record se l'id è null + if (id == null) return; // Salta il record se l'id è null var query = @" IF EXISTS (SELECT 1 FROM Bookmaker WHERE bookmaker_id = @bookmaker_id) diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Comparison.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Comparison.cs index 905307f..2f9af80 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Comparison.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Comparison.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Fixture.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Fixture.cs index fe9d610..12e98db 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Fixture.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Fixture.cs @@ -1,6 +1,6 @@ using System; using System.Data; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database @@ -143,7 +143,7 @@ namespace HorseRacingPredictor.Football.Database try { - using (var connection = new System.Data.SqlClient.SqlConnection(_connectionString)) + using (var connection = new Microsoft.Data.SqlClient.SqlConnection(_connectionString)) { connection.Open(); @@ -186,7 +186,7 @@ namespace HorseRacingPredictor.Football.Database ORDER BY f.date ASC"; - using (var adapter = new System.Data.SqlClient.SqlDataAdapter(query, connection)) + using (var adapter = new Microsoft.Data.SqlClient.SqlDataAdapter(query, connection)) { adapter.Fill(result); } diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/FixtureLeague.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/FixtureLeague.cs index 8faf7b2..875d190 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/FixtureLeague.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/FixtureLeague.cs @@ -1,6 +1,6 @@ -using System; +using System; using System.Collections.Generic; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using System.Linq; using System.Text; using Newtonsoft.Json.Linq; diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Goals.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Goals.cs index 1dd96b9..6bd29df 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Goals.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Goals.cs @@ -1,5 +1,5 @@ using System; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/H2H.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/H2H.cs index d1ee7a3..29a73a4 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/H2H.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/H2H.cs @@ -1,6 +1,6 @@ -using System; +using System; using System.Collections.Generic; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/League.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/League.cs index d452002..f83dfd4 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/League.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/League.cs @@ -1,5 +1,5 @@ using System; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/LeagueStats.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/LeagueStats.cs index b561545..a935800 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/LeagueStats.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/LeagueStats.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Odds.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Odds.cs index c9282ed..2511abf 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Odds.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Odds.cs @@ -1,5 +1,5 @@ using System; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using System.Linq; using Newtonsoft.Json.Linq; diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Prediction.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Prediction.cs index 2251004..4a94e06 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Prediction.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Prediction.cs @@ -1,5 +1,5 @@ using System; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Score.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Score.cs index 02308e1..2458e97 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Score.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Score.cs @@ -1,5 +1,5 @@ using System; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Team.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Team.cs index 3f51d6c..3032513 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Team.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/Team.cs @@ -1,5 +1,5 @@ using System; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/TeamStats.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/TeamStats.cs index f082c93..91cc821 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Database/TeamStats.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Database/TeamStats.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; using Newtonsoft.Json.Linq; namespace HorseRacingPredictor.Football.Database diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Main.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Main.cs index f15e197..d1f9635 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Main.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Main.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Data; using System.Linq; @@ -8,7 +8,7 @@ using RestSharp; using System.Text.Json; using System.Text.Json.Nodes; using Newtonsoft.Json.Linq; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; namespace HorseRacingPredictor.Football { @@ -276,7 +276,7 @@ namespace HorseRacingPredictor.Football } /// - /// Recupera le quote per la data specificata (potenzialmente più pagine) utilizzando API.Odds + /// Recupera le quote per la data specificata (potenzialmente più pagine) utilizzando API.Odds /// private List GetOdds(DateTime date) { @@ -392,7 +392,7 @@ namespace HorseRacingPredictor.Football } } - // FASE 5: Inserisci relazioni tra entità e dati dipendenti + // FASE 5: Inserisci relazioni tra entità e dati dipendenti foreach (var responseItem in asArray(jsonObject["response"])) { int? fixtureId = null; @@ -572,8 +572,8 @@ namespace HorseRacingPredictor.Football { try { - // In questo metodo non elaboriamo più direttamente le risposte - // Le risposte sono già state salvate nel database dalla classe API + // In questo metodo non elaboriamo più direttamente le risposte + // Le risposte sono già state salvate nel database dalla classe API // e verranno elaborate dal metodo ProcessUnprocessedApiResponses // Processa le risposte non elaborate @@ -608,7 +608,7 @@ namespace HorseRacingPredictor.Football dataTable.Columns.Add("Quota Trasferta", typeof(string)); dataTable.Columns.Add("Over 2.5", typeof(string)); dataTable.Columns.Add("Under 2.5", typeof(string)); - dataTable.Columns.Add("BTTS Sì", typeof(string)); + dataTable.Columns.Add("BTTS Sì", typeof(string)); dataTable.Columns.Add("BTTS No", typeof(string)); dataTable.Columns.Add("Doppia Casa/X", typeof(string)); dataTable.Columns.Add("Doppia Casa/Trasf", typeof(string)); @@ -646,7 +646,7 @@ namespace HorseRacingPredictor.Football { try { - // Verifica che le proprietà essenziali esistano + // Verifica che le proprietà essenziali esistano if (!item.TryGetProperty("fixture", out var fixtureEl) || !item.TryGetProperty("league", out var leagueEl) || !item.TryGetProperty("teams", out var teamsEl)) @@ -700,7 +700,7 @@ namespace HorseRacingPredictor.Football row["Quota Trasferta"] = DBNull.Value; row["Over 2.5"] = DBNull.Value; row["Under 2.5"] = DBNull.Value; - row["BTTS Sì"] = DBNull.Value; + row["BTTS Sì"] = DBNull.Value; row["BTTS No"] = DBNull.Value; row["Doppia Casa/X"] = DBNull.Value; row["Doppia Casa/Trasf"] = DBNull.Value; @@ -731,7 +731,7 @@ namespace HorseRacingPredictor.Football // Crea una copia del DataTable delle partite var combinedTable = fixturesTable.Copy(); - // Se non ci sono risposte di quote o la tabella delle partite è vuota, ritorna la tabella originale + // Se non ci sono risposte di quote o la tabella delle partite è vuota, ritorna la tabella originale if (oddsResponses == null || oddsResponses.Count == 0 || combinedTable.Rows.Count == 0) { return combinedTable; @@ -868,7 +868,7 @@ namespace HorseRacingPredictor.Football var table = new DataTable(); table.Columns.Add("Errore", typeof(string)); var row = table.NewRow(); - row["Errore"] = "Si è verificato un errore durante il recupero dei dati."; + row["Errore"] = "Si è verificato un errore durante il recupero dei dati."; table.Rows.Add(row); return table; } @@ -972,7 +972,7 @@ namespace HorseRacingPredictor.Football { string val = GetOddValueString(v, "value"); string odd = GetOddValueString(v, "odd"); - if (val == "Yes") row["BTTS Sì"] = odd; + if (val == "Yes") row["BTTS Sì"] = odd; else if (val == "No") row["BTTS No"] = odd; } break; @@ -1079,7 +1079,7 @@ namespace HorseRacingPredictor.Football var result = CreateEmptyFixturesDataTable(); // Step 2: Delegare alla classe repository appropriata il recupero dei dati - // Utilizziamo principalmente il repository Fixture che può coordinarsi con gli altri repository + // Utilizziamo principalmente il repository Fixture che può coordinarsi con gli altri repository return _fixtureRepository.GetProcessedFixtures(); } catch (Exception ex) diff --git a/HorseRacingPredictor/HorseRacingPredictor/Football/Manager/Database.cs b/HorseRacingPredictor/HorseRacingPredictor/Football/Manager/Database.cs index d0ce7c4..1ba88fb 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Football/Manager/Database.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Football/Manager/Database.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; using System.Text.Json.Nodes; using HorseRacingPredictor.Football.Database; @@ -7,7 +7,7 @@ namespace HorseRacingPredictor.Football.Manager { internal class Database : HorseRacingPredictor.Manager.Database { - // Implementazione della proprietà astratta _connectionString per il database calcio + // Implementazione della proprietà astratta _connectionString per il database calcio protected override string _connectionString => "Server=DESKTOP-9O9JHFS;Database=TestBS_Football;User Id=sa;Password=Asti2019;"; // Usato il modificatore "new" per evitare il warning CS0108 @@ -28,11 +28,11 @@ namespace HorseRacingPredictor.Football.Manager base.ExecuteTransactionalQuery(operation, action); } - // Questo metodo ora è vuoto e sarà implementato nella Main + // Questo metodo ora è vuoto e sarà implementato nella Main public void ProcessAndInsertData(string jsonResponse) { - // Il codice è stato spostato in Football.Main - LogError("l'elaborazione dei dati calcistici", new NotImplementedException("Questo metodo è stato spostato in Football.Main")); + // Il codice è stato spostato in Football.Main + LogError("l'elaborazione dei dati calcistici", new NotImplementedException("Questo metodo è stato spostato in Football.Main")); } /// diff --git a/HorseRacingPredictor/HorseRacingPredictor/Horses/Database.cs b/HorseRacingPredictor/HorseRacingPredictor/Horses/Database.cs index e021715..8300dbc 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Horses/Database.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Horses/Database.cs @@ -1,6 +1,6 @@ -using System; +using System; using System.Collections.Generic; -using System.Data.SqlClient; +using Microsoft.Data.SqlClient; using System.Data; using System.IO; using BettingPredictor; @@ -10,7 +10,7 @@ namespace HorseRacingPredictor.Horses { internal class Database : HorseRacingPredictor.Manager.Database { - // Implementazione della proprietà astratta _connectionString per il database cavalli + // Implementazione della proprietà astratta _connectionString per il database cavalli protected override string _connectionString => "Server=DESKTOP-9O9JHFS;Database=TestBS_Horses;User Id=sa;Password=Asti2019;"; private readonly FileReader fileReaderHorses; diff --git a/HorseRacingPredictor/HorseRacingPredictor/Manager/Database.cs b/HorseRacingPredictor/HorseRacingPredictor/Manager/Database.cs index 3b46ada..778e2c8 100644 --- a/HorseRacingPredictor/HorseRacingPredictor/Manager/Database.cs +++ b/HorseRacingPredictor/HorseRacingPredictor/Manager/Database.cs @@ -1,5 +1,5 @@ -using System; -using System.Data.SqlClient; +using System; +using Microsoft.Data.SqlClient; namespace HorseRacingPredictor.Manager { @@ -69,7 +69,7 @@ namespace HorseRacingPredictor.Manager } /// - /// Metodo per verificare se la connessione al database è valida + /// Metodo per verificare se la connessione al database è valida /// public bool TestConnection() { diff --git a/HorseRacingPredictor/HorseRacingPredictor/packages.config b/HorseRacingPredictor/HorseRacingPredictor/packages.config deleted file mode 100644 index 44dde51..0000000 --- a/HorseRacingPredictor/HorseRacingPredictor/packages.config +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file