Ejemplo n.º 1
0
            public Result Handle(Command message)
            {
                var following = _repository.GetFollowing(message.UserId, message.FolloweeId);

                if (following != null)
                {
                    return(Result.Fail <Command> ("Following already exists."));
                }

                var newFollowing = Following.Create(message);

                _repository.Add(newFollowing);
                _repository.SaveAll();

                return(Result.Ok());
            }