Open Closed

Abpsuite menu generation and DB to CODE #942

[email protected] created
  1. When i generate code, the UI menu items are all created as main menus, at the time of generating how can i create the menu item under another menu item or how can i edit the same after creating ?
  2. I have a DB with 50 tables, i want to generate ABP code using this DB, how can i generate the code from this DB using abp suite ? I also have the classes for this DB that are currently working well with free version. How can i used load this classes to the abp suite UI so that it can generate the rest of the code ?
  3. Then i want to rename all default abp tables belows. Any guide on how i can rename all this tables.

1 Answer(s)
  • 0
    alper created
    Support Team

    1- Menu items are configured in your MenuContributor class. See the following example that adds a menu grup and child items under it.

                    var administrationMenu = context.Menu.GetAdministration();             
                    var identityMenuItem = new ApplicationMenuItem(IdentityMenuNames.GroupName, l["Menu:IdentityManagement"], icon: "fa fa-id-card-o");
                    administrationMenu.AddItem(identityMenuItem); // *** adds a parent menu group ***
    				identityMenuItem.AddItem(new ApplicationMenuItem(IdentityMenuNames.Roles, l["Roles"], url: "~/Identity/Roles")); //*** adds a child menu item ***


    2- What you want is generating CRUD pages from database table. It's not supported at the moment. But it's on the roadmap. So you need to manually create the entity from Suite UI.

    3- Renaming table is related to EF Core migrations. You can make it in OnModelCreating. (EF Core fluent migration)

    protected override void OnModelCreating(DbModelBuilder modelBuilder)