Following the CQRS pattern, is it allowed to add complex types inside the command? (See "Address"-class in example below)
public interface ICommand{}
public class RegisterNewUser: ICommand{
public string FirstName {get;set;}
public string LastName {get;set;}
public List<Address> Addresses {get;set;}
}
public class Address{
public string Street {get;set;}
public string City {get;set;}
}
public class RegisterNewUserHandler: ICommandHandler<RegisterNewUser>{
//Do some stuff
}
In my opinion, I would say yes... but I think I've seen others that say you're not allowed to do this.