Стать исполнителем новая версия

This commit is contained in:
Халимов Рустам
2026-02-27 23:32:09 +03:00
parent c824e26cc0
commit 36e7c07a0d
15 changed files with 379 additions and 12 deletions
@@ -37,5 +37,16 @@ public class AccountConfiguration : IEntityTypeConfiguration<Account>
.WithOne()
.HasForeignKey<UserProfile>(p => p.Id)
.OnDelete(DeleteBehavior.Cascade);
// Soft Delete
builder.Property(x => x.IsDeleted)
.IsRequired()
.HasDefaultValue(false);
builder.Property(x => x.DeletedAt)
.IsRequired(false);
// Фильтр для soft delete
builder.HasQueryFilter(x => !x.IsDeleted);
}
}