Base solution for your next web application
Open Closed

How to use a custom implementation of IClockProvider #716


User avatar
0
birthdaycensus created

How can I register a custom implementation of IClockProvider so as to overwrite the LocalclockProvider that seems to be used in the application especially in the SetCreationAuditProperties of the AbpDbContext. I saw in Abp.Timing.Clock class static constructor that the Provider is been manually set to LocalClockProvider. What do you suggest I do? Thanks

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    You can add this code to your project:

    Clock.Provider = new YourCustomProvider();
    

    You can do it in your module's PreInitialize (or even as a first line in Application_Start in global.asax)

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)