Starts in:
1 DAY
20 HRS
46 MIN
55 SEC
Starts in:
1 D
20 H
46 M
55 S
Open Closed

Entity with recursion - GetListAsync api is not working and not even displaying on index page - Generated using abp suite #6999


User avatar
0
surajlokhandemmew created

ABP Framework version: v8.0.0

UI Type: MVC + Flutter

Database System: MongoDB

Tiered (for MVC) or Auth Server Separated (for Angular): no

Below is the entity with recursion

public abstract class ChatResourceDtoBase : FullAuditedEntityDto<Guid>, IHasConcurrencyStamp
{
    public string? ChipTitle { get; set; }
    public string? ChipTitleArabic { get; set; }
    public string? Color { get; set; }
    public string? BackColor { get; set; }
    public string? Action { get; set; }
    public string? ExtraField { get; set; }
    public Guid? ChatResourceId { get; set; }

    public string ConcurrencyStamp { get; set; } = null!;

}    

And here is the API

 [Authorize(MyDhobiPermissions.ChatResources.Default)]
 public abstract class ChatResourcesAppServiceBase : ApplicationService
 {
     protected IDistributedCache<ChatResourceExcelDownloadTokenCacheItem, string> _excelDownloadTokenCache;
     protected IChatResourceRepository _chatResourceRepository;
     protected ChatResourceManager _chatResourceManager;

     public ChatResourcesAppServiceBase(IChatResourceRepository chatResourceRepository, ChatResourceManager chatResourceManager, IDistributedCache<ChatResourceExcelDownloadTokenCacheItem, string> excelDownloadTokenCache)
     {
         _excelDownloadTokenCache = excelDownloadTokenCache;
         _chatResourceRepository = chatResourceRepository;
         _chatResourceManager = chatResourceManager;
     }

     public virtual async Task<PagedResultDto<ChatResourceWithNavigationPropertiesDto>> GetListAsync(GetChatResourcesInput input)
     {
         var totalCount = await _chatResourceRepository.GetCountAsync(input.FilterText, input.ChipTitle, input.ChipTitleArabic, input.Color, input.BackColor, input.Action, input.ExtraField, input.ChatResourceId);
         var items = await _chatResourceRepository.GetListWithNavigationPropertiesAsync(input.FilterText, input.ChipTitle, input.ChipTitleArabic, input.Color, input.BackColor, input.Action, input.ExtraField, input.ChatResourceId, input.Sorting, input.MaxResultCount, input.SkipCount);

         return new PagedResultDto<ChatResourceWithNavigationPropertiesDto>
         {
             TotalCount = totalCount,
             Items = ObjectMapper.Map<List<ChatResourceWithNavigationProperties>, List<ChatResourceWithNavigationPropertiesDto>>(items)
         };
     }

     public virtual async Task<ChatResourceWithNavigationPropertiesDto> GetWithNavigationPropertiesAsync(Guid id)
     {
         return ObjectMapper.Map<ChatResourceWithNavigationProperties, ChatResourceWithNavigationPropertiesDto>
             (await _chatResourceRepository.GetWithNavigationPropertiesAsync(id));
     }

Since GetListAsync is returning 0 items but on creation data is getting saved properly in database , please help me resolve this issue ,what could be the cause and how can i resolve it ?


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