C# 如何让 CQRS 适应项目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12851479/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to adapt CQRS to projects?
提问by Hyman
I came across a new term named CQRS (Command Query Responsibility Segregation)which states that the conceptual model should be split into command model and query model as a typical CRUD model in which the command and query happens in the same model. The article has all theory information.
我遇到了一个名为CQRS(命令查询职责分离)的新术语,它指出概念模型应该拆分为命令模型和查询模型作为典型的 CRUD 模型,其中命令和查询发生在同一模型中。这篇文章有所有的理论信息。
I don't understand how I should implement this in a project with ASP.net MVC3, EF 4.3 and jQuery.
我不明白我应该如何在带有 ASP.net MVC3、EF 4.3 和 jQuery 的项目中实现这一点。
Can anybody suggest me how to practically implement it in my project?
有人可以建议我如何在我的项目中实际实施它吗?
采纳答案by Ekk
CQRS Journeyis a good place to start. I also suggest you watch A Journey into CQRSon Channel9.
CQRS 之旅是一个很好的起点。我还建议您在 Channel9上观看CQRS 之旅。
Anyway, the best thing to learn CQRS is to try it by yourself. For me, I have to learn how to adapt it to my projects for around 6 months.
不管怎样,学习 CQRS 最好的方法是自己尝试。对我来说,我必须在大约 6 个月的时间里学习如何使其适应我的项目。
回答by Guillaume Schuermans
This article has a detailed explanation. introduction to cqrs
这篇文章有详细的解释。 cqrs简介
回答by TechnicalKalsa
Here you can find sample code for asp.net mvc with cqrs. CQRS with MVC. Find more video here CQRS with ASP.NET MVC - A Year On
在这里您可以找到带有 cqrs 的 asp.net mvc 示例代码。CQRS 与 MVC。在此处查找更多视频CQRS with ASP.NET MVC - A Year On
回答by Narvalex
I want to point out the classic example from Greg Young himself: Simple CQRS example
我想指出 Greg Young 本人的经典例子:Simple CQRS example
回答by SFun28
Take a look at Its.CQRS: https://github.com/jonsequitur/Its.Cqrswhich is being used in production at Microsoft.
看看它的.CQRS:https: //github.com/jonsequitur/Its.Cqrs,它正在微软的生产中使用。

