diff --git a/$REPO_NAMEDBContext.cs b/$REPO_NAME_DBContext.cs similarity index 62% rename from $REPO_NAMEDBContext.cs rename to $REPO_NAME_DBContext.cs index df31046..88f3eb3 100644 --- a/$REPO_NAMEDBContext.cs +++ b/$REPO_NAME_DBContext.cs @@ -5,12 +5,12 @@ using $REPO_NAME.Models; namespace $REPO_NAME; -public partial class $REPO_NAMEDBContext : DbContext +public partial class $REPO_NAME_DBContext : DbContext { public DbSet Channels { get; set; } - public $REPO_NAMEDBContext() { } - public $REPO_NAMEDBContext(DbContextOptions<$REPO_NAMEDBContext> options) : base(options) { } + public $REPO_NAME_DBContext() { } + public $REPO_NAME_DBContext(DbContextOptions<$REPO_NAME_DBContext> options) : base(options) { } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseNpgsql(Shared.DBConnectionString); diff --git a/.gitea/template b/.gitea/template index 02a3367..e4b4af6 100644 --- a/.gitea/template +++ b/.gitea/template @@ -1,6 +1,6 @@ $REPO_NAME.csproj $REPO_NAME.service -$REPO_NAMEDBContext.cs +$REPO_NAME_DBContext.cs appsettings.sample.json Components/_Imports.razor Components/App.razor @@ -10,7 +10,7 @@ devuitls.sh Jenkinsfile Migrations/20241213175020_greets.cs Migrations/20241213175020_greets.Designer.cs -Migrations/Test236DBContextModelSnapshot.cs +Migrations/$REPO_NAME_DBContextModelSnapshot.cs Models/GreetCounter.cs Program.cs README.md diff --git a/Migrations/Test236DBContextModelSnapshot.cs b/Migrations/$REPO_NAME_DBContextModelSnapshot.cs similarity index 90% rename from Migrations/Test236DBContextModelSnapshot.cs rename to Migrations/$REPO_NAME_DBContextModelSnapshot.cs index a9081ba..2491de3 100644 --- a/Migrations/Test236DBContextModelSnapshot.cs +++ b/Migrations/$REPO_NAME_DBContextModelSnapshot.cs @@ -10,8 +10,8 @@ using $REPO_NAME; namespace $REPO_NAME.Migrations { - [DbContext(typeof($REPO_NAMEDBContext))] - partial class $REPO_NAMEDBContextModelSnapshot : ModelSnapshot + [DbContext(typeof($REPO_NAME_DBContext))] + partial class $REPO_NAME_DBContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { diff --git a/Migrations/20241213175020_greets.Designer.cs b/Migrations/20241213175020_greets.Designer.cs index 765d3dd..314aede 100644 --- a/Migrations/20241213175020_greets.Designer.cs +++ b/Migrations/20241213175020_greets.Designer.cs @@ -11,7 +11,7 @@ using $REPO_NAME; namespace $REPO_NAME.Migrations { - [DbContext(typeof($REPO_NAMEDBContext))] + [DbContext(typeof($REPO_NAME_DBContext))] [Migration("20241213175020_greets")] partial class greets { diff --git a/Program.cs b/Program.cs index eccd842..c79d32c 100644 --- a/Program.cs +++ b/Program.cs @@ -34,7 +34,7 @@ app.UseStaticFiles(); app.UseAntiforgery(); app.MapGet("/hi", () => { - var db = new $REPO_NAMEDBContext(); + var db = new $REPO_NAME_DBContext(); var greetcount = db.Greets.FirstOrDefault(); if(greetcount == null) {