Use the configuration depending on the selected database provider #13

Merged
Wesser merged 33 commits from feat/database-persistence into feat/add-setup 2024-06-01 05:45:18 +03:00
108 changed files with 278 additions and 170 deletions
Showing only changes of commit b81fe6d8c1 - Show all commits
Application/Common/Mappings
Backend.sln
Endpoint
Configuration/General/Settings
Program.cs
Persistence
SqlData
Application
Application.csproj
Common
Cqrs
DependencyInjection.cs
Interfaces/DbContexts
Domain
Persistence

@ -8,7 +8,7 @@ public sealed class CampusConfiguration : IEntityTypeConfiguration<Campus>
{ {
public void Configure(EntityTypeBuilder<Campus> builder) public void Configure(EntityTypeBuilder<Campus> builder)
{ {
builder.ToTable("MyCampusName"); builder.ToTable(nameof(Campus));
builder.HasKey(c => c.Id); builder.HasKey(c => c.Id);
builder.HasIndex(c => c.Id).IsUnique(); builder.HasIndex(c => c.Id).IsUnique();
builder.Property(c => c.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd(); builder.Property(c => c.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd();