Starts in:
2 DAYS
3 HRS
56 MIN
9 SEC
Starts in:
2 D
3 H
56 M
9 S

Activities of "s.beckers"

Thank you! In which version will the bug fix be released?

Hi

Thanks for confirming. I've overridden the EntityHistoryHelper's GetPropertyChanges method to include the property changes of the referenced entities.

using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.Extensions.Options;
using System.Collections.Generic;
using Volo.Abp.Auditing;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore.EntityHistory;
using Volo.Abp.Json;
using Volo.Abp.Timing;

namespace MyCompany.MyModule;

[Dependency(ReplaceServices = true)]
public class CustomEntityHistoryHelper : EntityHistoryHelper
{
    public CustomEntityHistoryHelper(
        IAuditingStore auditingStore,
        IOptions<AbpAuditingOptions> options,
        IClock clock,
        IJsonSerializer jsonSerializer,
        IAuditingHelper auditingHelper)
        : base(auditingStore, options, clock, jsonSerializer, auditingHelper)
    {
    }

    protected override List<EntityPropertyChangeInfo> GetPropertyChanges(EntityEntry entityEntry)
    {
        List<EntityPropertyChangeInfo> propertyChanges = base.GetPropertyChanges(entityEntry);

        foreach (ReferenceEntry reference in entityEntry.References)
        {
            if (reference.TargetEntry == null)
            {
                continue;
            }

            List<EntityPropertyChangeInfo> referencePropertyChanges = GetPropertyChanges(reference.TargetEntry);

            foreach (EntityPropertyChangeInfo referencePropertyChange in referencePropertyChanges)
            {
                referencePropertyChange.PropertyName = $"{reference.Metadata.Name}.{referencePropertyChange.PropertyName}";
            }

            propertyChanges.AddRange(referencePropertyChanges);
        }

        return propertyChanges;
    }
}

Any remarks on this approach?

Answer

Earlier versions suite was generating AppService names singular. With version 4.3 we realised suite started to generate new service names plural.

Sample: Old: ProductAppService New: ProductsAppService

Is this a new approach for naming convention? Or is this a bug in the templates? The generated .cs class file name is also still singular.

Showing 21 to 23 of 23 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06