tags:

views:

111

answers:

4

Does some resource of Audit exist in SubSonic?

+1  A: 

It has the built in CreatedOn, CreatedBy, ModifiedOn, and ModifiedBy columns that you would just need to add to your table. For further audit capabilities I would suggest writing triggers.

rball
No, please don't write triggers. They're a HUGE pain to maintain.
John Sheehan
They are? Just for auditing? I've actually never really had an issue there, and thought that having that sort of functionality embedded in the db itself improved perf. I suppose I could be wrong, but as yet haven't had any problems maintaining them...what am I missing?
rball
+1  A: 

With 3.x using the LinqTemplates or in 2.2 using RepositoryRecord, you can write a repository base class and then add auditing in derived repository classes. I demonstrated how to use a repository base class on my blog (for 2.2).

John Sheehan
A: 

I am using the version 2.2 of the subsonic I added the columns CreatedBy, CreatedOn, ModifiedBy, ModifiedOn in the database
I altered the command my_table.save () for my_table.Save(Membership.GetUser(true).ToString())

When it executes an insert the fields they are correctly update.
But when it executes an update the fields ModifiedBy, ModifiedOn is not modified.
What to do to correct?

Leandro
A: 

Some clue to solve?

Leandro