Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "aaron"

Pass a list of GrantedPermissions to StaticRoleDefinition in MyProject.Authorization.Roles.AppConfig.Configure.

  1. Check for JavaScript errors in the console.

<!-- -->

  1. Simply pass ConnectionString in CreateTenantInput.
Answer

I believe you're missing a DependsOn:

[DependsOn(typeof(GeneralTreeModule))]
public class StatusCastCoreModule : AbpModule

Note that Abp.GeneralTree is not an official ABP package.

Answer

http://docs.aspnetzero.com/documents/zero/latest/Development-Guide-Rad-Tool#how-to-edit-pre-defined-templates-or-create-a-new-template

https://momentjs.com/docs/

Specify Id instead of Dependent in your DTO.

No. Feature request: https://github.com/aspnetzero/aspnet-zero-core/issues/752

  1. How to avoid getting BenefitEnrolmentRule in the DependentEnrolmentRule (as this is already a parent object, why do I need it again for child), why it is retrieved in child object too.

From https://docs.microsoft.com/en-us/ef/core/querying/related-data#eager-loading:

Entity Framework Core will automatically fix-up navigation properties to any other entities that were previously loaded into the context instance. So even if you don't explicitly include the data for a navigation property, the property may still be populated if some or all of the related entities were previously loaded.

Related: https://github.com/aspnet/EntityFrameworkCore/issues/11564

  1. How can I fix this issue without writing ForEach loop for DependentEnrolmentRule and update.

Try these:

i. Don't query BenefitEnrolmentRule unnecessarily:

public async Task UpdateBenefitEnrolmentRule(BenefitEnrolmentRuleDto input)
{
    var benefitEnrolmentRule = ObjectMapper.Map<BenefitEnrolmentRule>(input);
    await _benefitEnrolmentRepository.UpdateAsync(benefitEnrolmentRule);
}

ii. Don't include DependentEnrolmentRules unnecessarily:

public async Task UpdateBenefitEnrolmentRule(BenefitEnrolmentRuleDto input)
{
    var benefitEnrolmentRule = await _benefitEnrolmentRepository.GetAll()
                .Where(e => e.Id == input.Id)
                .SingleOrDefaultAsync();

    ObjectMapper.Map(input, benefitEnrolmentRule);
    await _benefitEnrolmentRepository.UpdateAsync(benefitEnrolmentRule);
}

iii. Specify .AsNoTracking():

public async Task UpdateBenefitEnrolmentRule(BenefitEnrolmentRuleDto input)
{
    var benefitEnrolmentRule = await _benefitEnrolmentRepository.GetAll()
                .Include(e => e.DependentEnrolmentRules)
                .Where(e => e.Id == input.Id)
                .AsNoTracking()
                .SingleOrDefaultAsync();

    ObjectMapper.Map(input, benefitEnrolmentRule);
    await _benefitEnrolmentRepository.UpdateAsync(benefitEnrolmentRule);
}
  1. Am I doing something wrong.

For starters:

  • Always specify whether you are using ASP.NET Core (EF Core) or MVC 5 (EF6).
  • Format code properly.
  • Four? I see three. (Please format code properly.)
  • For internal server error, always check Logs.txt.
  • TenantCacheExtensions must not be generic if you expect ABP to register it by convention.
var organizationUnitIdsOfUser = _userOrganizationUnitRepository.GetAll()
    .Where(uou => uou.UserId == input.UserId)
    .Select(uou => uou.OrganizationUnitId);
Showing 551 to 560 of 1543 entries