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)
-
0
Hi @developer_infoline,
You can add the new module to Suite, using
add an existing solutionbutton. Then create a CRUD page on the module solution.Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
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.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
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.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
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.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
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?
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
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<GenericNotificationDbContext> options) : base(options) { } protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); builder.ConfigureGenericNotification(); }}
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
1
Thank you for your answer. I solved my problem with suite update. I was able to create entities and services correctly.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
