Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Oct 8, 2024
1 parent 1e371ae commit dd91eaf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- feat: Automatically produce user-friendly response messages in behaviors for Save and Delete operations that fail due to a violation of a SQL Server foreign key or unique constraint. This behavior can be controlled with the `DetailedEfConstraintExceptionMessages` setting in `.AddCoalesce(c => c.Configure(o => { ... }))`, or by overriding `StandardBehaviors.GetExceptionResult`. This is not a substitute for adding proper validation or other handling of related entities - it only exists to provide a better user experience in cases where the developer has forgotten to handle these situations. This behavior does respect Coalesce's security model and won't produce descriptions of types or values that the user is not allowed to see.

- refactor: `CoalesceOptions.DetailedEntityFrameworkExceptionMessages` has been renamed to `CoalesceOptions.DetailedEFMigrationExceptionMessages`
- fix: The "Max _N_ items retrieved" message in c-select now accounts for list calls that don't provide a count, e.g. by passing `noCount=true`.

# 5.0.3
Expand Down
14 changes: 0 additions & 14 deletions playground/Coalesce.Domain/AppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
cb.OwnsOne(c => c.CompanyHqAddress);
});

//modelBuilder.Entity<Person>()
// .HasMany(p => p.CasesAssigned)
// .WithOne(p => p.AssignedTo)
// .HasForeignKey(p => p.AssignedToId)
// .HasPrincipalKey(p => p.PersonId)
// .OnDelete(DeleteBehavior.Restrict);

//modelBuilder.Entity<Person>()
// .HasMany(p => p.CasesReported)
// .WithOne(p => p.ReportedBy)
// .HasForeignKey(p => p.ReportedById)
// .HasPrincipalKey(p => p.PersonId)
// .OnDelete(DeleteBehavior.Restrict);

modelBuilder
.Entity<Case>()
.ToTable("Case")
Expand Down

0 comments on commit dd91eaf

Please sign in to comment.