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..." })); }
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" })); }
public abstract ValidationResult AddPost(UserAddPostCommand command);