Skip to content

Commit

Permalink
rollback whitespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
martyn-w committed Jan 9, 2025
1 parent 2b9e03e commit 4de45ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GetIntoTeachingApi/Database/GetIntoTeachingDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ public class GetIntoTeachingDbContext : DbContext

public GetIntoTeachingDbContext(DbContextOptions<GetIntoTeachingDbContext> options)
: base(options)
{
{
ConfigureNpgsql();
}

public static void ConfigureNpgsql()
{
public static void ConfigureNpgsql()
{
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
}

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<TeachingEvent>().HasOne(c => c.Building).WithMany(b => b.TeachingEvents)
.HasForeignKey(e => e.BuildingId).OnDelete(DeleteBehavior.SetNull);
modelBuilder.Entity<PickListItem>().HasKey(t => new { t.Id, t.EntityName, t.AttributeName });
modelBuilder.Entity<PickListItem>().HasKey(t => new { t.Id, t.EntityName, t.AttributeName });
}
}
}

0 comments on commit 4de45ac

Please sign in to comment.