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 ?
32 Answer(s)
-
0
does usermanager need ay permission?? and its this class right? IdentityUserManager
-
0
no the IdenttiyUserManager don’t need permission you are using the IdentityUserAppService and it required a permission. That’s why you get the exception
-
0
why this api (await _identityUserManager.AddPasswordAsync (userdetails,input.Password)).CheckErrors(); is asking for a password with non alphanumeric and upper case character when i have disabled it in settings.
-
0
Please try
// inject IOptions<AbpIdentityOptions> protected IOptions<AbpIdentityOptions> AbpIdentityOptions { get; } ..... await IdentityOptions.SetAsync(); // set option first. await _identityUserManager.AddPasswordAsync (userdetails,input.Password)).CheckErrors()
-
0
i am getting this error : using Microsoft.Extensions.Options;
Options must be derived from the Volo.Abp.Options.AbpDynamicOptionsManager`1!",
-
0
Hi,
Sorry, my bad.
Should be
IOptions<IdentityOptions>
notIOptions<AbpIdentityOptions>
-
0
Hi,
Sorry, my bad.
Should be
IOptions<IdentityOptions>
notIOptions<AbpIdentityOptions>
working thanks a lot