Support forum for ASP.NET Zero (
By BobIngham
#29254 .Net core, angular, 5.4.0
I download the new version and set up as per instructions.
I login as the default tenant and add a new Organization Unit.
I go to Audit Logs and can see the Operation for CreateOrganizationUnit in the Operation log tab.
I switch tabs to Change logs and can not see the creation, I select the admin user and the OrganizationUnit entity and can still not see any changes.
I update the Organization Unit and return to the Audit Log -> Change log tab and can still not see any changes.
Am I missing something?
User avatar
By aaron
#29269 Uncomment this line in *EntityFrameworkCoreModule:

Code: Select all//Uncomment below line to write change logs for the entities below:
//Configuration.EntityHistory.Selectors.Add("AbpZeroTemplateEntities", typeof(OrganizationUnit), typeof(Role), typeof(Tenant));
User avatar
By aaron
#29420 Yes. From the documentation on Entity History:
Entity History is enabled by default. You can disable it as shown below:
Code: Select allpublic class MyModule : AbpModule
    public override void PreInitialize()
        Configuration.EntityHistory.IsEnabled = false;


No entities are automatically tracked by default. You should configure entities either by using the startup configuration or via attributes.
By BobIngham
#29491 Hi Aaron,

Just to be clear, I add the following lines to ProjectnameEntityFrameworkCoreModule (I am tracking history for all fully audited entities):

Code: Select allConfiguration.EntityHistory.IsEnabled = true; //Enable this to write change logs for the entities below:
Configuration.EntityHistory.Selectors.Add("NuagecareEntities", typeof(OrganizationUnit), typeof(Role), typeof(User), typeof(Tenant));
    new NamedTypeSelector(
        type => typeof(IFullAudited).IsAssignableFrom(type)

Can you tell what the following lines are for in AuditLogAppService and do I need to change anything?
Code: Select allpublic List<NameValueDto> GetEntityHistoryObjectTypes()
    var entityHistoryObjectTypes = new List<NameValueDto>();

    if (AbpSession.TenantId == null)
        entityHistoryObjectTypes.Add(new NameValueDto(L("Nuagecare.MultiTenancy.Tenant"), "Nuagecare.MultiTenancy.Tenant"));
    entityHistoryObjectTypes.Add(new NameValueDto(L("Nuagecare.MultiTenancy.Role"), "Nuagecare.MultiTenancy.Role"));
    entityHistoryObjectTypes.Add(new NameValueDto(L("Abp.Organizations.OrganizationUnit"), "Abp.Organizations.OrganizationUnit"));

    return entityHistoryObjectTypes;

Thanking you in advance....