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

Activities of "andmattia"

Hi this is the full stack error

Sorry my mistake.

My application is multidbcontext so on other dbcontext then the first I've used AbpDbContext that not has implemented the HistoryEntity. So I change my dbcontext to use AbpZeroDbContext so now history works well.

Hi maliming

I invastigate on my code like your suggestion and now the ILogger it will be injected automaticly if I derive on application a class from AbpExport module like the code below

public class VatCheckExporter : ExcelExporter<VatChekcExcelOutDto>, IVatCheckExporter
    {
    ...
    }

Probably I need to extend my module to do exact what I need. So I see that is possible to inject via IocManger, but is not a god option for testing in this way

using (var excelExport = IocManager.Instance.ResolveAsDisposable<ExcelExporter<VatChekcExcelOutDto>>())
            {
            ...
            }

Hi maliming

I update my solution to 4.8.1 and now on my DB there are the History Log Tables. So I add the code like in the documenation to track my entity Activity a do an update but nothing will be tracked on DB

    [Audited]
    public class Activity : FullAuditedEntity<long>, IMustHaveTenant
    {
        public int TenantId { get; set; }
        public DateTime Date { get; set; }
        public DateTime IntTime { get; set; }
        ...
    }

// On my PreInitialize module
    
    Configuration.EntityHistory.IsEnabled = true;
            Configuration.EntityHistory.Selectors.Add(new NamedTypeSelector(
                "Abp.FullAuditedEntities",
                type => typeof (IFullAudited).IsAssignableFrom(type)
            ));

what I'm wrong?

Sorry I forget to write it: ABP / ABP Zerp 4.2.0

thk because on stackoverflow there was an old answer or probably old answer... Stackoverflow.

So now I add on my core module this 2 lines

            Configuration.EntityHistory.IsEnabled = true;
            Configuration.EntityHistory.Selectors.Add("Activity", typeof(Activities.Activity));

but no history works... I check on my db and I don't find any table named History? is it correct? Or maybe I lost some migration?

@ismcagdas

I look into the Core solution when I plan to use shared DLL and I see that on Core there is some DLL but is not a ABP module.

What I'm wrong?

@maliming

I send via email my complete module source code

For sure. I add my module file


    [DependsOn(typeof(AbpKernelModule))]
    public class AbpExportingModule : AbpModule
    {
        public override void PreInitialize()
        {
            IocManager.Register<IAppFolders, AppBaseFolders>();
        }

        public override void Initialize()
        {
            //IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
            
            IocManager.RegisterAssemblyByConvention(typeof(AbpExportingModule).GetAssembly());
        }

        public override void PostInitialize()
        {
            //AppFolders = Dependency.IocManager.Instance.IocContainer.Resolve<IAppFolders>();
            //Logger = Dependency.IocManager.Instance.IocContainer.Resolve<ILogger>();
            //LocalizationManager = Dependency.IocManager.Instance.IocContainer.Resolve<ILocalizationManager>();
        }
    }

mmm but I try to put a break point but it's never call ... are you sure?

So the big question is why my class ha not ILogger correctly initialize...

Showing 71 to 80 of 136 entries