{"id":17792154,"url":"https://github.com/hlaueriksson/commandquery","last_synced_at":"2025-04-05T23:08:02.900Z","repository":{"id":10729661,"uuid":"66767673","full_name":"hlaueriksson/CommandQuery","owner":"hlaueriksson","description":"Command Query Separation for 🌐ASP.NET Core ⚡AWS Lambda ⚡Azure Functions ⚡Google Cloud Functions","archived":false,"fork":false,"pushed_at":"2024-09-03T22:37:01.000Z","size":3095,"stargazers_count":107,"open_issues_count":1,"forks_count":17,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-10-13T16:59:35.916Z","etag":null,"topics":["asp-net-core","aws-lambda","azure-functions","command-query","cqs","csharp","dotnet","google-cloud-functions"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hlaueriksson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-28T12:46:03.000Z","updated_at":"2024-09-14T18:56:18.000Z","dependencies_parsed_at":"2024-05-05T06:32:49.931Z","dependency_job_id":"57cfbf1d-9b60-4e6f-8070-f29c4cf59c59","html_url":"https://github.com/hlaueriksson/CommandQuery","commit_stats":{"total_commits":507,"total_committers":1,"mean_commits":507.0,"dds":0.0,"last_synced_commit":"7ed31318ee2b23f8c7477faf8f53aca161c8dd9e"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlaueriksson%2FCommandQuery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlaueriksson%2FCommandQuery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlaueriksson%2FCommandQuery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlaueriksson%2FCommandQuery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlaueriksson","download_url":"https://codeload.github.com/hlaueriksson/CommandQuery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net-core","aws-lambda","azure-functions","command-query","cqs","csharp","dotnet","google-cloud-functions"],"created_at":"2024-10-27T10:58:11.987Z","updated_at":"2025-04-05T23:08:02.866Z","avatar_url":"https://github.com/hlaueriksson.png","language":"C#","readme":"# CommandQuery\u003c!-- omit in toc --\u003e\n\n[![build](https://github.com/hlaueriksson/CommandQuery/actions/workflows/build.yml/badge.svg)](https://github.com/hlaueriksson/CommandQuery/actions/workflows/build.yml)\n[![CodeFactor](https://codefactor.io/repository/github/hlaueriksson/commandquery/badge)](https://codefactor.io/repository/github/hlaueriksson/commandquery)\n\n[![CommandQuery](https://img.shields.io/nuget/v/CommandQuery.svg?label=CommandQuery)](https://www.nuget.org/packages/CommandQuery)\n[![CommandQuery.Abstractions](https://img.shields.io/nuget/v/CommandQuery.Abstractions.svg?label=CommandQuery.Abstractions)](https://www.nuget.org/packages/CommandQuery.Abstractions)\n\n[![CommandQuery.AspNetCore](https://img.shields.io/nuget/v/CommandQuery.AspNetCore.svg?label=CommandQuery.AspNetCore)](https://www.nuget.org/packages/CommandQuery.AspNetCore)\n[![CommandQuery.AWSLambda](https://img.shields.io/nuget/v/CommandQuery.AWSLambda.svg?label=CommandQuery.AWSLambda)](https://www.nuget.org/packages/CommandQuery.AWSLambda)\n[![CommandQuery.AzureFunctions](https://img.shields.io/nuget/v/CommandQuery.AzureFunctions.svg?label=CommandQuery.AzureFunctions)](https://www.nuget.org/packages/CommandQuery.AzureFunctions)\n[![CommandQuery.GoogleCloudFunctions](https://img.shields.io/nuget/v/CommandQuery.GoogleCloudFunctions.svg?label=CommandQuery.GoogleCloudFunctions)](https://www.nuget.org/packages/CommandQuery.GoogleCloudFunctions)\n\n[![CommandQuery.Client](https://img.shields.io/nuget/v/CommandQuery.Client.svg?label=CommandQuery.Client)](https://www.nuget.org/packages/CommandQuery.Client)\n\n## Content\u003c!-- omit in toc --\u003e\n\n- [Introduction](#introduction)\n- [Packages](#packages)\n  - [`CommandQuery` ⚙️](#commandquery-️)\n  - [`CommandQuery.AspNetCore` 🌐](#commandqueryaspnetcore-)\n  - [`CommandQuery.AWSLambda` ⚡](#commandqueryawslambda-)\n  - [`CommandQuery.AzureFunctions` ⚡](#commandqueryazurefunctions-)\n  - [`CommandQuery.GoogleCloudFunctions` ⚡](#commandquerygooglecloudfunctions-)\n  - [`CommandQuery.Client` 🧰](#commandqueryclient-)\n- [Upgrading](#upgrading)\n- [Acknowledgements](#acknowledgements)\n\n## Introduction\n\nCommand Query Separation (CQS) for .NET and C#\n\n- Build services that separate the responsibility of commands and queries\n- Focus on implementing the handlers for commands and queries\n- Create APIs with less boilerplate code\n\nAvailable for:\n\n```txt\n🌐 ASP.NET Core\n⚡ AWS Lambda\n⚡ Azure Functions\n⚡ Google Cloud Functions\n```\n\nCommand Query Separation?\n\n\u003e **Queries**: Return a result and do not change the observable state of the system (are free of side effects).\n\u003e\n\u003e **Commands**: Change the state of a system but do not return a value.\n\u003e\n\u003e — \u003ccite\u003e[Martin Fowler](http://martinfowler.com/bliki/CommandQuerySeparation.html)\u003c/cite\u003e\n\nIn other words:\n\n- Commands\n  - Writes (create, update, delete) data\n- Queries\n  - Reads and returns data\n\nThe traditional approach that commands *do not return a value* is a bit inconvenient.\n\n`CommandQuery` has a pragmatic take and supports both commands with and without result 👍\n\n## Packages\n\n### `CommandQuery` ⚙️\n\n[![NuGet](https://img.shields.io/nuget/v/CommandQuery.svg) ![NuGet](https://img.shields.io/nuget/dt/CommandQuery.svg)](https://www.nuget.org/packages/CommandQuery)\n\n\u003e Command Query Separation for .NET\n\n- 📃 README: [CommandQuery.md](CommandQuery.md)\n- 💁 Samples:\n  - [`CommandQuery.Sample.Contracts`](/samples/CommandQuery.Sample.Contracts)\n  - [`CommandQuery.Sample.Handlers`](/samples/CommandQuery.Sample.Handlers)\n\n### `CommandQuery.AspNetCore` 🌐\n\n[![NuGet](https://img.shields.io/nuget/v/CommandQuery.AspNetCore.svg) ![NuGet](https://img.shields.io/nuget/dt/CommandQuery.AspNetCore.svg)](https://www.nuget.org/packages/CommandQuery.AspNetCore)\n\n\u003e Command Query Separation for ASP.NET Core\n\n- 📃 README: [CommandQuery.AspNetCore.md](CommandQuery.AspNetCore.md)\n- 💁 Samples:\n  - [`CommandQuery.Sample.AspNetCore`](/samples/CommandQuery.Sample.AspNetCore)\n  - [`CommandQuery.Sample.AspNetCore.Tests`](/samples/CommandQuery.Sample.AspNetCore.Tests)\n\n### `CommandQuery.AWSLambda` ⚡\n\n[![NuGet](https://img.shields.io/nuget/v/CommandQuery.AWSLambda.svg) ![NuGet](https://img.shields.io/nuget/dt/CommandQuery.AWSLambda.svg)](https://www.nuget.org/packages/CommandQuery.AWSLambda)\n\n\u003e Command Query Separation for AWS Lambda\n\n- 📃 README: [CommandQuery.AWSLambda.md](CommandQuery.AWSLambda.md)\n- 💁 Samples:\n  - [`CommandQuery.Sample.AWSLambda`](/samples/CommandQuery.Sample.AWSLambda)\n  - [`CommandQuery.Sample.AWSLambda.Tests`](/samples/CommandQuery.Sample.AWSLambda.Tests)\n\n### `CommandQuery.AzureFunctions` ⚡\n\n[![NuGet](https://img.shields.io/nuget/v/CommandQuery.AzureFunctions.svg) ![NuGet](https://img.shields.io/nuget/dt/CommandQuery.AzureFunctions.svg)](https://www.nuget.org/packages/CommandQuery.AzureFunctions)\n\n\u003e Command Query Separation for Azure Functions\n\n- 📃 README: [CommandQuery.AzureFunctions.md](CommandQuery.AzureFunctions.md)\n- 💁 Samples:\n  - [`CommandQuery.Sample.AzureFunctions`](/samples/CommandQuery.Sample.AzureFunctions)\n  - [`CommandQuery.Sample.AzureFunctions.Tests`](/samples/CommandQuery.Sample.AzureFunctions.Tests)\n\n### `CommandQuery.GoogleCloudFunctions` ⚡\n\n[![NuGet](https://img.shields.io/nuget/v/CommandQuery.GoogleCloudFunctions.svg) ![NuGet](https://img.shields.io/nuget/dt/CommandQuery.GoogleCloudFunctions.svg)](https://www.nuget.org/packages/CommandQuery.GoogleCloudFunctions)\n\n\u003e Command Query Separation for Google Cloud Functions\n\n- 📃 README: [CommandQuery.GoogleCloudFunctions.md](CommandQuery.GoogleCloudFunctions.md)\n- 💁 Samples:\n  - [`CommandQuery.Sample.GoogleCloudFunctions`](/samples/CommandQuery.Sample.GoogleCloudFunctions)\n  - [`CommandQuery.Sample.GoogleCloudFunctions.Tests`](/samples/CommandQuery.Sample.GoogleCloudFunctions.Tests)\n\n### `CommandQuery.Client` 🧰\n\n[![NuGet](https://img.shields.io/nuget/v/CommandQuery.Client.svg) ![NuGet](https://img.shields.io/nuget/dt/CommandQuery.Client.svg)](https://www.nuget.org/packages/CommandQuery.Client)\n\n\u003e Clients for CommandQuery APIs\n\n- 📃 README: [CommandQuery.Client.md](CommandQuery.Client.md)\n- 💁 Samples:\n  - [`CommandQuery.Sample.Client`](/samples/CommandQuery.Sample.Client)\n\n## Upgrading\n\n\u003e ⬆️ Upgrading from version `3.0.0` to `4.0.0`\n\nUpgrade AspNetCore:\n\n- Upgrade the project target framework to `net8.0`\n\nUpgrade AWSLambda:\n\n- Upgrade the project target framework to `net8.0`\n\nUpgrade AzureFunctions:\n\n- Upgrade the project target framework to `net8.0`\n- Remove the `logger` argument from `HandleAsync`\n- Consider to use the `HttpRequest` versions of `HandleAsync`\n\nUpgrade GoogleCloudFunctions:\n\n- Upgrade the project target framework to `net8.0`\n- Remove the `logger` argument from `HandleAsync`\n\n## Acknowledgements\n\nInspired by _Steven van Deursen_ blog posts:\n\n- [Meanwhile... on the command side of my architecture](https://blogs.cuttingedge.it/steven/posts/2011/meanwhile-on-the-command-side-of-my-architecture/)\n- [Meanwhile... on the query side of my architecture](https://blogs.cuttingedge.it/steven/posts/2011/meanwhile-on-the-query-side-of-my-architecture/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlaueriksson%2Fcommandquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlaueriksson%2Fcommandquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlaueriksson%2Fcommandquery/lists"}