Open Closed

LimitedResultRequestDto is missing when generating code with 10.7 #10949


User avatar
0
ageiter created

I’ve updated my project to 10.7.0 and regenerated the entities using the suite. Thanks in advance for the fixes included in the new version.

However, I now have a new problem. The new Server.Tests.Application.txt template now references a class called LimitedResultRequestDto, which I don’t yet have in my project.

In my opinion, this should be included in Volo.Abp.Application.Dtos, just like PagedResultRequestDto, but it doesn’t seem to be there.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

12 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • LimitedResultRequestDto is an ABP Framework type and it should come from the Volo.Abp.Application.Dtos namespace (same place as PagedResultRequestDto).
    • In ABP 10.7, PagedResultRequestDto inherits from LimitedResultRequestDto (so Suite templates referencing LimitedResultRequestDto is consistent with the framework DTO hierarchy).

    What to do in your solution (ABP 10.7.0):

    1. Ensure your projects reference the correct ABP package(s)

      • The DTO base classes (LimitedResultRequestDto, PagedResultRequestDto, etc.) come from ABP’s application contracts layer packages (transitively or directly).
      • Make sure the project where the template is compiled (typically *.Application.Contracts and/or *.TestBase / *.Tests) references ABP 10.7.0 packages consistently (no mixed versions).
    2. Clean and restore to eliminate stale assemblies

      • Delete bin/obj for the solution (or run dotnet clean + delete bin/obj).
      • Run dotnet restore
      • Rebuild the whole solution.
    3. If you still can’t compile because the type is missing

      • That indicates your solution is not actually resolving the ABP 10.7 assemblies that contain the DTOs (e.g., package downgrade, pinned central package version, or inconsistent package graph).
      • Fix by aligning all Volo.Abp.* package versions to 10.7.0 (including test projects).

    Reference (contains the LimitedResultRequestDto and shows its relationship to PagedResultRequestDto / PagedAndSortedResultRequestDto):

    • https://abp.io/docs/10.7/framework/architecture/domain-driven-design/data-transfer-objects

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    It’s all right, it was my mistake. When I merged the template, I forgot to add the new using Volo.Abp.Application.Dtos statement.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi,

    Thanks for letting us know. Feel free to open a new question if anything else comes up.

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    Could you make these test classes (such as the one mentioned above) partial in future, so that we can add our own extended class for further tests? I’ve now had to adapt this in my template.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi,

    Thanks for the suggestion. We'll make the generated test classes partial in the next release: the abstract *AppServiceTests<TStartupModule>, the EF Core/MongoDB *AppServiceTests classes, and *RepositoryTests.

    Until then, you can keep the partial change in your customized template.

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    Great thank you!

    One more request: I’ve created a base class for the two DbContexts (Host & Tenant) and moved the shared EF model definition there (I don’t like duplicate code). And for tables that I only want in the Hosts database, I still have the option of defining them there alone.

    As these are table definitions, I otherwise see a risk that discrepancies could arise if a manual change is made, because the change is only made in one place.

    Could you please consider whether you might want to do the same for the generated code?

    public abstract class BpoDbContextBase<TDbContext> : AbpDbContext<TDbContext>
        where TDbContext : DbContext
    { 
    ... 
    }
    
    [ConnectionStringName("Default")]
    public class BpoDbContext : BpoDbContextBase<BpoDbContext>
    {
        public DbSet<Kunde> Kunden { get; set; } = null!;
    
        public BpoDbContext(DbContextOptions<BpoDbContext> options)
            : base(options)
        {
        }
    
        protected override void OnModelCreating(ModelBuilder builder)
        {
            builder.SetMultiTenancySide(MultiTenancySides.Both);
            base.OnModelCreating(builder);
    
            // Configure mappings like that for the entities only available in the host side, but should not be in the tenant databases.
    
            if (builder.IsHostDatabase())
            {
                builder.Entity<Kunde>(b =>
                {
                    b.ToTable(BpoConsts.DbTablePrefix + "Kunde", BpoConsts.DbSchema);
                    b.ConfigureByConvention();
                    b.Property(x => x.Kundennummer).HasColumnName(nameof(Kunde.Kundennummer));
                    b.Property(x => x.Name).HasColumnName(nameof(Kunde.Name)).IsRequired().HasMaxLength(KundeConsts.NameMaxLength);
                });
            }
        }
    }
    
    [ConnectionStringName("Default")]
    public class BpoTenantDbContext : BpoDbContextBase<BpoTenantDbContext>
    {
        public BpoTenantDbContext(DbContextOptions<BpoTenantDbContext> options)
            : base(options)
        {
        }
    
        protected override void OnModelCreating(ModelBuilder builder)
        {
            builder.SetMultiTenancySide(MultiTenancySides.Tenant);
            base.OnModelCreating(builder);
        }
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    One more thing I’ve noticed. I think the new feature “RemoveUnusedUsings”: true doesn’t seem to be working. I’ve set it to true, but I still have a lot of unused usings after generation.

    Here are a few examples (this list is not complete):

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    To this end, changes are made to the formatting in the extended file (which do not comply with our style guidelines).

    I have seen this in the following classes:

    Domain:

    • Entity.Extended.cs
    • EntityManager.Extended.cs
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    The Const files are overwritten each time. Would it be possible to introduce Extended files here as well, so that we can store our own constants?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    Unfortunately, there’s another error… when generating EfCore…Repository.cs, there’s a mix-up with the using statements:

    I couldn’t figure out what was causing the problem. The template appears to be the same as before (I haven’t customised anything here). Nor did the RemoveUnusedUsings parameter have any effect when I set it to false.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    One more thing: Why is a required navigation property now made nullable?

    It's a master entity with two navigation properties (1:n). Both are required. In version 10.4, this was generated correctly.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ageiter created

    Sorry for all the different findings. I’d like to help improve the product. I’ve deliberately split it into six separate posts so that you can reply to them more easily. Thank you very much.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on October 21, 2026, 11:09
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.