MVC strongly-typed view, and server side setting properties before sending to lower layers?
问题 I have a layered application that send commands to the business layer (actually, the application is based on ncqrs framework, but I don't think it's important here). A command looks like this : public class RegisterUserCommand : CommandBase { public string UserName { get; set; } public string Email{ get; set; } public DateTime RegistrationDate { get; set; } public string ApiKey {get; set;} // edit } There is no logic in this class, only data. I want to have the users type their user name,