Browse Source

Update low-code docs: foreign key API & wording

Reflect API and copy updates in low-code docs. foreign-access.md: replace ConfigureProperty/SetForeignKey example with entity.AddOrGetProperty and assignment of a ForeignKeyDescriptor (EntityName, DisplayPropertyName, Access). index.md: minor wording tweaks for clarity and a corrected link anchor to the three-layer configuration system. model-json.md: remove the empty "foreignKeys" array from the entity JSON example to avoid implying it's required.
pull/24925/head
SALİH ÖZKARA 6 months ago
parent
commit
92446f50e7
  1. 9
      docs/en/low-code/foreign-access.md
  2. 6
      docs/en/low-code/index.md
  3. 1
      docs/en/low-code/model-json.md

9
docs/en/low-code/foreign-access.md

@ -39,10 +39,13 @@ AbpDynamicEntityConfig.EntityConfigurations.Configure(
"MyApp.Orders.Order",
entity =>
{
entity.ConfigureProperty("CustomerId", prop =>
var customerIdProperty = entity.AddOrGetProperty("CustomerId");
customerIdProperty.ForeignKey = new ForeignKeyDescriptor
{
prop.SetForeignKey("MyApp.Customers.Customer", "Name", ForeignAccess.Edit);
});
EntityName = "MyApp.Customers.Customer",
DisplayPropertyName = "Name",
Access = ForeignAccess.Edit
};
}
);
````

6
docs/en/low-code/index.md

@ -7,7 +7,7 @@
# Low-Code System
The ABP Low-Code System lets you define entities using C# attributes or Fluent API and automatically generates:
The ABP Low-Code System allows you to define entities using C# attributes or Fluent API and automatically generates:
* **Database tables** (via EF Core migrations)
* **CRUD REST APIs** (Get, GetList, Create, Update, Delete)
@ -19,7 +19,7 @@ No need to write entity classes, DTOs, application services, repositories, or UI
## Why Low-Code?
Traditionally, adding a new entity to an ABP application requires:
Traditionally, adding a new entity with full CRUD functionality to an ABP application requires:
1. Entity class in Domain
2. DbContext configuration in EF Core
@ -157,7 +157,7 @@ Alternatively, define entities in a JSON file without writing C# classes:
See [model.json Structure](model-json.md) for the full specification.
> Both approaches can be combined. The [three-layer configuration system](fluent-api.md#configuration-priority) merges Attributes, JSON, and Fluent API with clear priority rules.
> Both approaches can be combined. The [three-layer configuration system](fluent-api.md#three-layer-configuration-system) merges Attributes, JSON, and Fluent API with clear priority rules.
## Key Features

1
docs/en/low-code/model-json.md

@ -88,7 +88,6 @@ Each entity has the following structure:
"displayProperty": "Name",
"parent": null,
"properties": [],
"foreignKeys": [],
"interceptors": [],
"ui": {}
}

Loading…
Cancel
Save