Keep track of changes

Vote:
 

Hi,

We need to provide an interface to our client to sync their database.
It will have some methods that returns e.g. the users that were created,deleted and changed (only a few columns like first and last name, but not passwords) since the last sync date.

I made a prototype that uses some custom tables and triggers.

It's allowed to create our own tables (as long as they are in a different schema) but I think it is not allowed to use triggers on episerver tables.

It might be possible to add this programatically on every submit, but then direct database changes would not show up.
It should work for users, products and orders

How would you implement this? Did anyone came across the same problem?

Thanks in advance,

Brecht Vanneste

#187378
Jan 22, 2018 10:13
Vote:
 

Do I understand correctly that you want to log changes done in Episerver in this custom table? What kind of authentication are you using, would it be possible to implement in membership/role providers?

If you want to track content changes you could look at IContentSecurityRepository Events: https://world.episerver.com/documentation/class-library/?documentId=cms/9/62ADA7EA

#187412
Jan 22, 2018 18:16
Vote:
 

Hi Sebastian,

Thank you for the fast reply

Yes that is correct, that way we have a history of who and when a change has been made. (The sync goes two ways for users)
I think we will use OWIN authentication.

The trigger approach would've been a more unified solution, but I understand that it could break easily when database changes are made.

I'll dig a bit deeper into it, thanks!

#187436
Jan 23, 2018 9:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.