Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"Subsonic ActiveRecord CreatedBy, ModifiedBy, etc"
No comments yet. -
1 – 0 of 0
On ActiveRecord.tt
public void Update(IDataProvider provider){
...
}
removed the following block codes:
if(tbl.Columns.Any(x=>x.Name=="ModifiedBy")){
if(String.IsNullOrEmpty(this.ModifiedBy))
this.ModifiedBy=Environment.UserName;
}
if(tbl.Columns.Any(x=>x.Name=="ModifiedOn")){
this.ModifiedOn=DateTime.Now;
}
after that the method should look like the one below:
public void Update(IDataProvider provider) {
if(this._dirtyColumns.Count>0)
_repo.Update(this,provider);
OnSaved();
}
Similarly remove the rest of the Update() methods. Do the same with the Add() methods.
posted by fc at
4:17 PM
on Nov 5, 2010
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"Subsonic ActiveRecord CreatedBy, ModifiedBy, etc"
No comments yet. -