From 6deb25972ef71443d3b016ec306ce2f2e29a8045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SAL=C4=B0H=20=C3=96ZKARA?= Date: Tue, 24 Feb 2026 10:39:45 +0300 Subject: [PATCH] Use CommandInterceptorDescriptor constructor with name Replace setting CommandName property with the CommandInterceptorDescriptor(string) constructor in examples. Updated docs/en/low-code/fluent-api.md and docs/en/low-code/interceptors.md to pass "Create" and "Delete" as constructor arguments to simplify and clarify interceptor declarations; no functional change to behavior. --- docs/en/low-code/fluent-api.md | 3 +-- docs/en/low-code/interceptors.md | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/en/low-code/fluent-api.md b/docs/en/low-code/fluent-api.md index f42c47833d..5aa38fe66a 100644 --- a/docs/en/low-code/fluent-api.md +++ b/docs/en/low-code/fluent-api.md @@ -369,9 +369,8 @@ AbpDynamicEntityConfig.EntityConfigurations.Configure( ### Adding Interceptors ````csharp -entity.Interceptors.Add(new CommandInterceptorDescriptor +entity.Interceptors.Add(new CommandInterceptorDescriptor("Create") { - CommandName = "Create", Type = InterceptorType.Pre, Javascript = "if(!context.commandArgs.data['Name']) { globalError = 'Name is required!'; }" }); diff --git a/docs/en/low-code/interceptors.md b/docs/en/low-code/interceptors.md index f789ecaac8..7eaf97eb77 100644 --- a/docs/en/low-code/interceptors.md +++ b/docs/en/low-code/interceptors.md @@ -56,16 +56,14 @@ AbpDynamicEntityConfig.EntityConfigurations.Configure( "MyApp.Organizations.Organization", entity => { - entity.Interceptors.Add(new CommandInterceptorDescriptor + entity.Interceptors.Add(new CommandInterceptorDescriptor("Create") { - CommandName = "Create", Type = InterceptorType.Pre, Javascript = "if(!context.commandArgs.data['Name']) { globalError = 'Name is required!'; }" }); - entity.Interceptors.Add(new CommandInterceptorDescriptor + entity.Interceptors.Add(new CommandInterceptorDescriptor("Delete") { - CommandName = "Delete", Type = InterceptorType.Post, Javascript = "context.log('Deleted: ' + context.commandArgs.entityId);" });