Ejemplo n.º 1
0
 public override ValidationResult UpdateName(UserUpdateNameCommand command)
 {
     // TODO: Implement this method;
     return(ValidationResult.ErrorResult(new List <string> {
         "The Method \"UpdateName\" in Class \"User\" that is not implemented was called, aborting..."
     }));
 }
Ejemplo n.º 2
0
        public override ValidationResult UpdateName(UserUpdateNameCommand command)
        {
            var creationResult = Post.Create(new PostCreateCommand("luly"));

            if (command.Name.Length > 4)
            {
                MyPosts.Add(creationResult.CreatedEntity);
                return(ValidationResult.OkResult(new List <DomainEventBase> {
                    new UserUpdateNameEvent(command.Name, Id)
                }));
            }

            return(ValidationResult.ErrorResult(new List <string> {
                "Name too short to update"
            }));
        }
Ejemplo n.º 3
0
 public abstract ValidationResult UpdateName(UserUpdateNameCommand command);