Open Closed

CLI entity generation #9036


User avatar
0
mloung created

Hi there - is it possible to create entities from the CLI instead of the GUI suite only?


3 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, yes you can generate CRUD pages via ABP CLI, please refer to the Generating CRUD Pages via Command Line section in the ABP Suite documentation.

    Let me know, if you need further info. Regards.

  • User Avatar
    0
    mloung created

    Hi, yes you can generate CRUD pages via ABP CLI, please refer to the Generating CRUD Pages via Command Line section in the ABP Suite documentation.

    Let me know, if you need further info. Regards.

    I saw that reference but it assumes a json metadata file was generated via the Suite tool initially. If one is to manually replicate this, what are the minimum required properties?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, yes you can generate CRUD pages via ABP CLI, please refer to the Generating CRUD Pages via Command Line section in the ABP Suite documentation.

    Let me know, if you need further info. Regards.

    I saw that reference but it assumes a json metadata file was generated via the Suite tool initially. If one is to manually replicate this, what are the minimum required properties?

    You can use the following json template as an example:

    Promotion.json (entity name: "Promotion", and only has a single property named "Title")

    {
      "Id": "1148f4fe-8dfd-4435-8953-99db98b0c82a",
      "Name": "Promotion",
      "OriginalName": "Promotion",
      "NamePlural": "Promotions",
      "DatabaseTableName": "Promotions",
      "Namespace": "Promotions",
      "Type": 1,
      "MasterEntityName": null,
      "MasterEntity": null,
      "BaseClass": "FullAuditedAggregateRoot",
      "PageTitle": "Promotions",
      "MenuIcon": "file-alt",
      "PrimaryKeyType": "Guid",
      "PreserveCustomCode": true,
      "IsMultiTenant": false,
      "CheckConcurrency": true,
      "BulkDeleteEnabled": true,
      "ShouldCreateUserInterface": true,
      "ShouldCreateBackend": true,
      "ShouldExportExcel": true,
      "ShouldAddMigration": true,
      "ShouldUpdateDatabase": true,
      "CreateTests": true,
      "Properties": [
        {
          "Id": "e7c6fe43-3e99-495c-bde8-ecbbcd6793e3",
          "Name": "Title",
          "Type": "string",
          "EnumType": "",
          "EnumNamespace": "",
          "EnumAngularImport": "shared/enums",
          "EnumFilePath": null,
          "DefaultValue": null,
          "IsNullable": false,
          "IsRequired": false,
          "IsFilterable": true,
          "AllowEmptyStrings": false,
          "IsTextArea": false,
          "MinLength": null,
          "MaxLength": null,
          "SortOrder": 0,
          "SortType": 0,
          "Regex": "",
          "EmailValidation": false,
          "ShowOnList": true,
          "ShowOnCreateModal": true,
          "ShowOnEditModal": true,
          "ReadonlyOnEditModal": false,
          "EnumValues": null,
          "IsSelected": true,
          "MaxFileSize": null,
          "OrdinalIndex": 0
        }
      ],
      "NavigationProperties": [],
      "NavigationConnections": [],
      "ChildEntities": [],
      "PhysicalFileName": "Promotion.json"
    }
    
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20