Issue: I have a simple app service with one method but the generated proxy for the output DTO is incorrect.
AppService Method
public virtual async Task<PagedResultDto<CampaignDto>> GetCampaignListAsync(GetCampaignsInput input)
{
var totalCount = await _campaignRepository.GetCountAsync(input.FilterText, input.Name);
var items = await _campaignRepository.GetListAsync(input.FilterText, input.Name, input.Sorting, input.MaxResultCount, input.SkipCount, false);
return new PagedResultDto<CampaignDto>
{
TotalCount = totalCount,
Items = ObjectMapper.Map<List<Campaign>, List<CampaignDto>>(items)
};
}
Here is the problem>> Generated Proxy (incorrect)
import { ListResultDto } from '@abp/ng.core';
export class CampaignDto extends ListResultDto<ACME.Campaigns.CampaignDto> {
totalCount: number;
items: any[];
constructor(initialValues: Partial<CampaignDto> = {}) {
super(initialValues);
}
}
Generated Service (correct)
import { RestService , PagedResultDto} from '@abp/ng.core';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import {GetCampaignsInput, CampaignDto} from '../models';
@Injectable({providedIn: 'root'})
export class CampaignService {
apiName = 'Default';
constructor(private restService: RestService) {}
getCampaignListByInput(params = {} as GetCampaignsInput): Observable<PagedResultDto<CampaignDto>> {
return this.restService.request({ url: '/api/app/campaign/campaignList', method: 'GET', params },{ apiName: this.apiName });
}
}
DTO Class
namespace ACME.Campaigns
{
public class CampaignDto : AuditedEntityDto<Guid>
{
public string Name { get; set; }
}
}
hi alper,
this os a question.
i want to confirm if the above can be accomplished now.? or in a future update.
Thanks.. will wait..
I have another posted question for you https://support.abp.io/QA/Questions/268/General-Question--How-to-accomblish-a-touch-free-upgrade-in-the-future
using the new modular system of abp can the below be accomblished?
thank would be great :)
Dears,
are you planning an Angular Module Startup template ?
I can only see that you have an MVC one here : https://docs.abp.io/en/abp/latest/Startup-Templates/Module