Esempio n. 1
0
        public static void Log(RegisterUser command, Action next)
        {
            Console.WriteLine("Before registering a user: "******"After registering a user: " + command);
        }
        public static void Handle(RegisterUser command, UserRepository repository)
        {
            Console.WriteLine("Called with repository #{0}", repository.GetHashCode());

            repository.Save(new User
                {
                    Name = command.Username,
                    Password = command.Password,
                });
        }