Skip to content

Commit

Permalink
Revert "Use manual tosnakecase"
Browse files Browse the repository at this point in the history
This reverts commit 71959d3.
  • Loading branch information
LiamMorrow committed Nov 27, 2024
1 parent e554a3c commit 9fa1c8a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 138 deletions.
134 changes: 0 additions & 134 deletions LiftLog.Api/Db/ConversionExtensions.cs

This file was deleted.

1 change: 0 additions & 1 deletion LiftLog.Api/Db/RateLimitContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ public class RateLimitContext(DbContextOptions<RateLimitContext> options) : DbCo
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<RateLimitConsumption>().HasKey(x => x.Key);
modelBuilder.ToSnakeCaseNames();
}
}
1 change: 0 additions & 1 deletion LiftLog.Api/Db/UserDataContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity<UserEvent>().HasIndex(x => x.Expiry);

modelBuilder.Entity<UserEvent>().HasKey(x => new { x.UserId, x.Id });
modelBuilder.ToSnakeCaseNames();
}
}
1 change: 1 addition & 0 deletions LiftLog.Api/LiftLog.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PackageReference Include="cuid.net" Version="6.0.0" />
<PackageReference Include="FluentValidation" Version="11.11.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.11.0" />
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
4 changes: 2 additions & 2 deletions LiftLog.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
options
.UseNpgsql(builder.Configuration.GetConnectionString("UserDataContext"))
.ReplaceService<IHistoryRepository, CamelCaseHistoryContext>()
// .UseSnakeCaseNamingConvention()
.UseSnakeCaseNamingConvention()
);
builder.Services.AddDbContext<RateLimitContext>(options =>
options
.UseNpgsql(builder.Configuration.GetConnectionString("RateLimitContext"))
.ReplaceService<IHistoryRepository, CamelCaseHistoryContext>()
// .UseSnakeCaseNamingConvention()
.UseSnakeCaseNamingConvention()
);
builder.Services.AddCors(options =>
{
Expand Down

0 comments on commit 9fa1c8a

Please sign in to comment.