Skip to content

Commit fa6abd1

Browse files
committed
refactor(data): drop legacy data seeding utilities, replaced by migrations
1 parent 58a115f commit fa6abd1

File tree

5 files changed

+3
-66
lines changed

5 files changed

+3
-66
lines changed

src/Dotnet.Samples.AspNetCore.WebApi/Migrations/20250414195445_SeedStarting11.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Dotnet.Samples.AspNetCore.WebApi.Data;
1+
using Dotnet.Samples.AspNetCore.WebApi.Utilities;
22
using Microsoft.EntityFrameworkCore.Migrations;
33

44
#nullable disable

src/Dotnet.Samples.AspNetCore.WebApi/Program.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Dotnet.Samples.AspNetCore.WebApi.Mappings;
44
using Dotnet.Samples.AspNetCore.WebApi.Models;
55
using Dotnet.Samples.AspNetCore.WebApi.Services;
6-
using Dotnet.Samples.AspNetCore.WebApi.Utilities;
76
using Dotnet.Samples.AspNetCore.WebApi.Validators;
87
using FluentValidation;
98
using Microsoft.EntityFrameworkCore;
@@ -87,6 +86,4 @@
8786
// https://learn.microsoft.com/en-us/aspnet/core/fundamentals/routing#endpoints
8887
app.MapControllers();
8988

90-
await app.InitData();
91-
9289
await app.RunAsync();

src/Dotnet.Samples.AspNetCore.WebApi/Utilities/ApplicationBuilderExtensions.cs

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/Dotnet.Samples.AspNetCore.WebApi/Utilities/DbContextUtils.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/Dotnet.Samples.AspNetCore.WebApi/Data/PlayerData.cs renamed to src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Dotnet.Samples.AspNetCore.WebApi.Enums;
33
using Dotnet.Samples.AspNetCore.WebApi.Models;
44

5-
namespace Dotnet.Samples.AspNetCore.WebApi.Data;
5+
namespace Dotnet.Samples.AspNetCore.WebApi.Utilities;
66

77
public static class PlayerData
88
{
@@ -317,7 +317,7 @@ public static List<Player> MakeStarting11WithId()
317317
/// https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/deserialization
318318
/// </summary>
319319
/// <returns>A list of Players.</returns>
320-
public static List<Player> CreateFromDeserializedJson()
320+
public static List<Player> MakeStarting11FromDeserializedJson()
321321
{
322322
var players = new List<Player>();
323323

0 commit comments

Comments
 (0)