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.
12 Answer(s)
-
0
LimitedResultRequestDtois an ABP Framework type and it should come from theVolo.Abp.Application.Dtosnamespace (same place asPagedResultRequestDto).- In ABP 10.7,
PagedResultRequestDtoinherits fromLimitedResultRequestDto(so Suite templates referencingLimitedResultRequestDtois consistent with the framework DTO hierarchy).
What to do in your solution (ABP 10.7.0):
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.Contractsand/or*.TestBase/*.Tests) references ABP 10.7.0 packages consistently (no mixed versions).
- The DTO base classes (
Clean and restore to eliminate stale assemblies
- Delete
bin/objfor the solution (or rundotnet clean+ deletebin/obj). - Run
dotnet restore - Rebuild the whole solution.
- Delete
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
LimitedResultRequestDtoand shows its relationship toPagedResultRequestDto/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) -
0
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) -
0
Hi,
Thanks for the suggestion. We'll make the generated test classes
partialin the next release: the abstract*AppServiceTests<TStartupModule>, the EF Core/MongoDB*AppServiceTestsclasses, and*RepositoryTests.Until then, you can keep the
partialchange 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) -
0
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) -
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0
Unfortunately, there’s another error… when generating
EfCore…Repository.cs, there’s a mix-up with theusingstatements: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
RemoveUnusedUsingsparameter 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) -
0Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
-
0
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)







