Starts in:
1 DAY
13 HRS
2 MIN
9 SEC
Starts in:
1 D
13 H
2 M
9 S
Open Closed

Can I use CRUD Page Generator for the module I add to my application? #2782


User avatar
0
developer_infoline created

I created a project using the application template. I added a module to my project that I created with the help of suite. Can I add an entity to this module using CRUD Page Generator? Or do I have to do the configurations manually?

  • ABP Framework version: v5.1.4
  • UI type: MVC
  • DB provider: EF Core / Sql server
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

10 Answer(s)
  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Hi @developer_infoline,

    You can add the new module to Suite, using add an existing solution button. Then create a CRUD page on the module solution.

  • User Avatar
    0
    developer_infoline created

    Thank you for your answer but do I have to manually add its configurations (Database, migration) with my main project? Suite only creates Entity for me.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Yes, you have to create those configurations manually in your main project.

  • User Avatar
    0
    developer_infoline created

    I get the following error when "Create backend" is selected while creating Entity for the module. "An internal error occurred during your request!" I cannot create the backend codes in the module automatically. When "Create Backend" is not selected, it automatically creates the interface part correctly.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Can you share today's logs at %userprofile%\.abp\suite\logs folder? Only the last exception message is enough.

  • User Avatar
    0
    developer_infoline created

    2022-03-25 15:52:43.847 +03:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

    2022-03-25 15:52:43.849 +03:00 [ERR] Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'startIndex') System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'startIndex') at System.Globalization.CompareInfo.IndexOf(String source, String value, Int32 startIndex, Int32 count, CompareOptions options) at System.String.IndexOf(String value, Int32 startIndex, Int32 count, StringComparison comparisonType) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.CYBFIR5tlG(String , String , String ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.L0YFgQdute(String , String , Boolean , DatabaseProvider ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.RSXFx8DtON(String , DatabaseProvider ) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.InsFO5rDd7() at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.EntityGenerateCommand.ExecuteAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.CommandManager.ExecuteAllAsync(CrudPageCommandOptions options) at Volo.Abp.Suite.Areas.AbpSuite.CrudPageGenerator.Commands.CrudPageGenerator.GenerateAsync(EntityModel entity, Solution solution) at Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync(Guid solutionId, EntityModel entity) at lambda_method2431(Closure , Object ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Have you modified **DbContext.cs file in EntityFramework Core project? (in your module solution)

    Can you share the content of that file if it doesn't contain any private info?

  • User Avatar
    0
    developer_infoline created

    No i didn't make any changes,

    of course I share :

    using GenericNotification.GenericEntities; using GenericNotification.DateTestEntities; using GenericNotification.TestEntityLasts; using GenericNotification.TestEntities; using GenericNotification.NotificationMultiTenants; using GenericNotification.NotificationBackends; using GenericNotification.GenericNotifications; using GenericNotification.GenericNotificationNotificationOnes; using GenericNotification.NotificationOnes; using GenericNotification.TestTwos; using GenericNotification.Tests; using GenericNotification.Notifications; using Volo.Abp.EntityFrameworkCore.Modeling; using Microsoft.EntityFrameworkCore; using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore;

    namespace GenericNotification.EntityFrameworkCore;

    [ConnectionStringName(GenericNotificationDbProperties.ConnectionStringName)] public class GenericNotificationDbContext : AbpDbContext<GenericNotificationDbContext>, IGenericNotificationDbContext { /* Add DbSet for each Aggregate Root here. Example: * public DbSet<Question> Questions { public DbSet<GenericEntity> GenericEntities { get; set; } public DbSet<DateTestEntity> DateTestEntities { get; set; } public DbSet<DateTestEntity> DateTestEntities { get; set; } public DbSet<TestEntityLast> TestEntityLasts { get; set; } public DbSet<TestEntity> TestEntities { get; set; } public DbSet<NotificationMultiTenant> NotificationMultiTenants { get; set; } public DbSet<NotificationBackend> NotificationBackends { get; set; } public DbSet<GenericNotification> GenericNotifications { get; set; } public DbSet<GenericNotification> GenericNotifications { get; set; } public DbSet<GenericNotification> GenericNotifications { get; set; } public DbSet<GenericNotificationNotificationOne> GenericNotificationNotificationOnes { get; set; } public DbSet<NotificationOne> NotificationOnes { get; set; } public DbSet<TestTwo> TestTwos { get; set; } public DbSet<Test> Tests { get; set; } public DbSet<Test> Tests { get; set; } public DbSet<Test> Tests { get; set; } public DbSet<Test> Tests { get; set; } public DbSet<Notification> Notifications { get; set; } public DbSet<Notification> Notifications { get; set; } public DbSet<Notification> Notifications { get; set; } public DbSet<Notification> Notifications { get; set; } get; set; } */

    public GenericNotificationDbContext(DbContextOptions&lt;GenericNotificationDbContext&gt; options)
        : base(options)
    {
    
    }
    
    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);
    
        builder.ConfigureGenericNotification();
    }
    

    }

  • User Avatar
    0
    yekalkan created
    Support Team Fullstack Developer

    Is Suite v5.1.4 installed on your device?

  • User Avatar
    1
    developer_infoline created

    Thank you for your answer. I solved my problem with suite update. I was able to create entities and services correctly.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06