I figured this out.... :)
I got help from the following URL
http://docs.composite.net/Data/DataFAQ?q=How+to+attach+events+to+Composite+C1+Data+Stores%3F
Except I edited the code slightly...
I got help from the following URL
http://docs.composite.net/Data/DataFAQ?q=How+to+attach+events+to+Composite+C1+Data+Stores%3F
Except I edited the code slightly...
public static class MyEventRegistrator
{
static MyEventRegistrator()
{
DataEvents<CMSData.Locations.Cities>.OnAfterUpdate += new DataEventHandler (MyDataAfterAdd);
}
public static void Initialize()
{
// initialization code is in the static constructor
}
private static void MyDataAfterAdd(object sender, DataEventArgs dataEventArgs)
{
CMSData.Locations.Cities data = (CMSData.Locations.Cities)dataEventArgs.Data; // A page with data just added
// Do your magic here
//LoggingService.LogInformation("MyEventRegistrator", data.);
}
}