An abp module that dynamically generates management UI for entities in runtime.
-
Follow the document to install the dependent Abp.DynamicMenu module.
-
Install the following NuGet packages. (see how)
- EasyAbp.Abp.EntityUi.Application
- EasyAbp.Abp.EntityUi.Application.Contracts
- EasyAbp.Abp.EntityUi.Domain
- EasyAbp.Abp.EntityUi.Domain.Shared
- EasyAbp.Abp.EntityUi.EntityFrameworkCore
- EasyAbp.Abp.EntityUi.HttpApi
- EasyAbp.Abp.EntityUi.HttpApi.Client
- EasyAbp.Abp.EntityUi.Web
-
Add
DependsOn(typeof(AbpEntityUiXxxModule))
attribute to configure the module dependencies. (see how) -
Add
builder.ConfigureAbpEntityUi();
to theOnModelCreating()
method in MyProjectMigrationsDbContext.cs. -
Add EF Core migrations and update your database. See: ABP document.
-
Configure for the modules (or an app itself) you want to use EntityUi.
public class MyProjectDomainModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { // ... Configure<AbpEntityUiOptions>(options => { options.Modules.Add("MyProject", new AbpEntityUiModuleOptions(typeof(MyProjectDomainModule))); }); // ... } }
-
Run the DbMigrator project, the EntityUi seed contributor will discovery the entities and seed the metadata.
-
Run the app and log in as the admin user, you can see the "Entity UI" menu item, try to open it and change some entity configuration.
-
Use the management pages for the entities you just configured:
-
Export the configurations with the http API:
/api/abp/entity-ui/integration/module/{moduleName}
(GET). -
Create a JSON file like
EntityUiSeed.json
in your module project to save the exported data (see the demo) and set it as an EmbeddedResource. -
Configure the EntityUi to use it:
public class MyProjectDomainModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpEntityUiOptions>(options =>
{
options.Modules.Add(
"MyProject",
new AbpEntityUiModuleOptions(typeof(MyProjectDomainModule), "/EntityUiSeed.json")
);
});
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<MyProjectDomainModule>();
});
}
}
See the Entity UI dynamic entity provider document.
- Detail modal.
- Support dynamic entities.
- Support the MVC template.
- Support the Blazor template.
- Support the Angular template.