Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Created May 12, 2015 11:14
Show Gist options
  • Save cmatskas/caf6fce7fbcc29efd774 to your computer and use it in GitHub Desktop.
Save cmatskas/caf6fce7fbcc29efd774 to your computer and use it in GitHub Desktop.
public bool UpdateUser(User user)
{
var existingUser = this.GetUser(user.Username);
if (existingUser == null)
{
return false;
}
existingUser.CopyValues(user);
UnitOfWork.UserRepository.Update(existingUser);
UnitOfWork.Save();
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment