Example #1
0
 public override ValidationResult AddPost(UserAddPostCommand command)
 {
     // TODO: Implement this method;
     return(ValidationResult.ErrorResult(new List <string> {
         "The Method \"AddPost\" in Class \"User\" that is not implemented was called, aborting..."
     }));
 }
Example #2
0
        public override ValidationResult AddPost(UserAddPostCommand command)
        {
            if (command.NewPost != command.PostToDelete)
            {
                MyPosts.Add(command.NewPost);
                return(ValidationResult.OkResult(new List <DomainEventBase>
                {
                    new UserAddPostEvent(command.NewPost.Id, command.PostToDelete.Id, Id)
                }));
            }

            return(ValidationResult.ErrorResult(new List <string> {
                "Can not delete post that should be added"
            }));
        }
Example #3
0
 public abstract ValidationResult AddPost(UserAddPostCommand command);