Activities of "oleksandra.nakonechniuk"

Answer

this what method get features return and next time it will be 200

Answer

Question

Hello. I created FeatureDefinitionProvider in the domain layer. Is it ok? because I need to take some data from the database. Is it possible to do like this? And then I use the feature checker as You provide in the documentation. Can the name of the feature be with white space?

I am asking because when I created these features and load to prod, they were working correctly. But after several deploys, they fell. The method where I use the feature checker works every second time. I mean one time it returns a response next time it returns 500 HTTP error. And say that can't found feature the first in the list.
My using of feature checker :

public async Task<List<AssessmentTypeDto?>> GetMovementsTestFeatures() { var mvmTypes = await _asmTypeRepository.GetAssessmentTypes(AssessmentTypeNames.Movement); return await GetListAssessmentTypesWithCheckedFeatures(mvmTypes); }

private async Task&lt;List&lt;AssessmentTypeDto&gt;> GetListAssessmentTypesWithCheckedFeatures(List&lt;AssessmentType&gt; asmtypes)
{
    var results = _objectMapper.Map&lt;List&lt;AssessmentType&gt;, List&lt;AssessmentTypeDto&gt;>(asmtypes);
    var updatedResults = new List&lt;AssessmentTypeDto&gt;();

    foreach (var m in results)
    {
        var isEnableType = await _featureChecker.IsEnabledAsync(m.Code);

        if (isEnableType)
        {
            var movements = new List&lt;AssessmentMovementDto&gt;();

            foreach (var x in m.Movements)
            {
                var isEnabled = await _featureChecker.IsEnabledAsync(x.Code);

                if (isEnabled)
                {
                    movements.Add(x);
                }
            }

            m.Movements = movements.OrderBy(x => x.DisplayOrder).ToList();
        }
        else
        {
            m.Movements = new List&lt;AssessmentMovementDto&gt;();
        }

        if (isEnableType)
        {
            updatedResults.Add(m);
        }
    }

    return updatedResults;
}
Showing 11 to 13 of 13 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.