Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Servicestack store date in database as utc
public IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser)
{
ValidateNewUser(newUser);
using (var db = dbFactory.Open())
{
AssertNoExistingUser(db, newUser, existingUser);
newUser.Id = existingUser.Id;
newUser.PasswordHash = existingUser.PasswordHash;
newUser.Salt = existingUser.Salt;
newUser.DigestHa1Hash = existingUser.DigestHa1Hash;
newUser.CreatedDate = existingUser.CreatedDate;
newUser.ModifiedDate = DateTime.UtcNow;
db.Save((TUserAuth)newUser);
return newUser;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.