Click here to Skip to main content
15,886,780 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hey guys, I have an ASP.NET Web API 2 which has a table called "Events".

What I want is to have another table called "log" that will register all alterations done to the table "Events"(who made the change, when and what).

What is the best way to implement this? And how do I implement it?

Thanks in advance.
Posted
Comments
Kornfeld Eliyahu Peter 2-Mar-15 5:56am    
Ever heard of triggers?
varmartins 2-Mar-15 6:01am    
I have heard of them but databases are not my strong part... So you think the best way is to use a trigger that on update will add data to the "log" database?
Kornfeld Eliyahu Peter 2-Mar-15 6:36am    
I do not know about 'best', but certainly a good one...
I can think of other solutions, but any thing is depend of your requirements and goals...
varmartins 2-Mar-15 6:38am    
My requirements are to have the changes saved in a db, my goals are to do this effectively and in the easiest way possible

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900