Manager / DataProvider Events

Sitefinity CMS is implemented based on the provider pattern to offer an API that is easy to use and understand, and gives developers control over how the API works. All Manager implementations in Sitefinity CMS (and the respective DataProviders for these managers) expose events that you can subscribe to and plug additional logic. 
Generally, the EventHub events cover most use cases. We recommend working with the EventHub API because of its simplicity. However, not all events can be exposed via EventHub. In such cases, you use the Manager / DataProvider but keep in mind that working with these events requires advanced knowledge of the system. 
 

Executing and Executed events

The DataProvider / Manager events follow a standard naming convention:
  • Executing events
    You are subscribing to an event when data is not yet committed to the database. Thus, you can modify the data, perform validation, integrity check, and so on before passing the control back to Sitefinity.
  • Executed events
    You can plug in your logic right after Sitefinity commits the data to the database and is handling some post-commit tasks, for example, adjusting content relations. When hooking up to these events you usually want to control what happens to the data that is already persisted.

NOTE: These events fire more than once, depending on the CRUD operation you are performing. To identify whether someone is creating, updating, or deleting an item, you need to check for the item status in your implementation.


Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?

Next article

System Flags