in Education by
I'm getting started with CQRS, and thought It would make the most sense to use the Command object as the Model on my forms. I can take advantage of some of the client-side validation for the commands using DataAnnotations, client-side validation, makes it pretty clean... My question... does this raise any problems? If my command does not have a default constructor, will this make this process impossible? Do I need to create my own CommandModelBinder that can constructor inject the aggregate ID? Your thoughts, I can't find this technique anywhere and Im assuming because it doesn't work. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I'd recommend that you take a look at Greg Young's article on task-based UI's on how DTOs and Messages interact with your system (both client-side and server-side). I agree with Sebastian that your Commands will match exactly with what your user interface will look like. As a result, you'll probably need to have separate DTO/Model classes and Commands. That's really not a bad thing as your Model is really the result of your query-side of the system and really shouldn't be an exact duplicate of the messages you're sending into the system. Also, by keeping your commands separate from your model, your concern about Command constructors goes away. Your controller just collects information from the client, constructs the command and then submits it. If you're getting started with CQRS, Greg's site (cqrsinfo.com) is pretty good, especially his 6 1/2 hours video. Yes, it's 6 1/2 hours, but it really is a great introduction and overview of what CQRS is all about. It helped me out tremendously. Hope this helps!

Related questions

0 votes
    I am running aspnet_compiler as a post-build event, using the following command: aspnet_compiler.exe -v / - ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I have an Azure table datastore and here's my model for one class: public class Product : ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 21, 2022 in Education by JackTerrance
0 votes
    I have the following HTML/ASP.NET code: Ny test Name: When using the "POST" form post method I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    My thinking is that people use Docker to be sure that local environment is the same as production and that ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 12, 2022 in Education by JackTerrance
0 votes
    I'm looking to build an reusable control or custom helper for my MVC project. I'm sure there is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm looking to build an reusable control or custom helper for my MVC project. I'm sure there is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm looking to build an reusable control or custom helper for my MVC project. I'm sure there is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I am in charge of providing a theme functionality for a site using a big CSS file (thousands of ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    I'm building an app using Visual Studio 2010. I can run my asp.net website from my computer (by ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    I have a viewmodel with an Id property [Required] public int Id { get; set; } But I think this ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I have a viewmodel with an Id property [Required] public int Id { get; set; } But I think this ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 27, 2022 in Education by JackTerrance
0 votes
    I can't use Microsoft's Web Platform Installer to install webmatrix. The error message is "Web Platform ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
...