Created
September 1, 2014 17:31
-
-
Save vuamitom/7ff861827f3040a9b5e2 to your computer and use it in GitHub Desktop.
Servicestack store date in database as utc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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