Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CFPCompass.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{00D1A9C2-B5F0-4AF3-8072-F6C62B433612}") = "SQLDatabase", "src\SQLDatab
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{837BF340-B0AF-4B2D-AC69-D550AE5B4CB2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLData", "SQLData\SQLData.csproj", "{F4A66304-0B96-434A-9B1C-67327E0F1768}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -23,6 +25,10 @@ Global
{837BF340-B0AF-4B2D-AC69-D550AE5B4CB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{837BF340-B0AF-4B2D-AC69-D550AE5B4CB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{837BF340-B0AF-4B2D-AC69-D550AE5B4CB2}.Release|Any CPU.Build.0 = Release|Any CPU
{F4A66304-0B96-434A-9B1C-67327E0F1768}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4A66304-0B96-434A-9B1C-67327E0F1768}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4A66304-0B96-434A-9B1C-67327E0F1768}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4A66304-0B96-434A-9B1C-67327E0F1768}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 4 additions & 0 deletions ConsoleApp/ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
<PackageReference Include="Spectre.Console" Version="0.50.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SQLData\SQLData.csproj" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion ConsoleApp/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
global using Azure.Identity;
global using ConsoleApp.Models;
global using Microsoft.EntityFrameworkCore;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.Configuration.AzureAppConfiguration;
global using Octokit;
global using Spectre.Console;
global using SQLData;
global using SQLData.Models;
global using System.Text;
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
namespace ConsoleApp.Models;
using Microsoft.EntityFrameworkCore;
using SQLData.Models;

namespace SQLData;

public partial class CFPCompassContext(DbContextOptions<CFPCompassContext> options) : DbContext(options)
{
Expand Down Expand Up @@ -26,7 +29,7 @@ public static CFPCompassContext CreateDbContext(string connectionString)

public virtual DbSet<ShindigType> ShindigTypes { get; set; }

public virtual DbSet<TimeZone> TimeZones { get; set; }
public virtual DbSet<Models.TimeZone> TimeZones { get; set; }

public virtual DbSet<WorldRegion> WorldRegions { get; set; }

Expand Down Expand Up @@ -292,7 +295,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.SortOrder).HasComment("The sorting order of the shindig type.");
});

modelBuilder.Entity<TimeZone>(entity =>
modelBuilder.Entity<Models.TimeZone>(entity =>
{
entity.HasKey(e => e.Id).HasName("pkcTimeZone");

Expand Down
2 changes: 1 addition & 1 deletion ConsoleApp/Models/Cfp.cs → SQLData/Models/Cfp.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

public partial class CFP
{
Expand Down
2 changes: 1 addition & 1 deletion ConsoleApp/Models/Cfptype.cs → SQLData/Models/Cfptype.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

public partial class CFPType
{
Expand Down
2 changes: 1 addition & 1 deletion ConsoleApp/Models/Country.cs → SQLData/Models/Country.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Lookup table representing the countries as defined by the ISO 3166-1 standard.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Lookup table representing the world regions as defined by the ISO 3166-2 standard.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Represents a spoken/written language.
Expand Down
2 changes: 1 addition & 1 deletion ConsoleApp/Models/Shindig.cs → SQLData/Models/Shindig.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

public partial class Shindig
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Represents a status of a shindig.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Represents a type of a shindig.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Represents the list of time zones as defined by the IANA.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ConsoleApp.Models;
namespace SQLData.Models;

/// <summary>
/// Lookup table representing the world regions as defined by the UN M49 specification.
Expand Down
13 changes: 13 additions & 0 deletions SQLData/SQLData.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" />
</ItemGroup>

</Project>