예제 #1
0
		public void Handle(ChangeUserName command)
		{
			Action act = () =>
			{
				var user = _store.Load<User>(command.Id).Result;
				user.ChangeName(command.NewName);
				_store.Commit(user).Wait();
			};

			PerformWithRetry(act);
		}
		public void Handle(ChangeUserName command)
		{
			Action act = () =>
			{
				Console.WriteLine("Changing user name to {0}.", command.NewName);

				var user = _store.Load<User>(command.Id).Result;
				user.ChangeName(command.NewName);
				_store.Commit(user).Wait();
			};

			PerformWithRetry(act);
		}