diff --git a/PoweredSoft.CQRS.AspNetCore/Mvc/QueryControllerFeatureProvider.cs b/PoweredSoft.CQRS.AspNetCore/Mvc/QueryControllerFeatureProvider.cs index 02d0ad3..d3f520a 100644 --- a/PoweredSoft.CQRS.AspNetCore/Mvc/QueryControllerFeatureProvider.cs +++ b/PoweredSoft.CQRS.AspNetCore/Mvc/QueryControllerFeatureProvider.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.Extensions.DependencyInjection; using PoweredSoft.CQRS.Abstractions.Discovery; +using PoweredSoft.CQRS.AspNetCore.Abstractions.Attributes; using System; using System.Collections.Generic; using System.Reflection; @@ -23,6 +24,10 @@ namespace PoweredSoft.CQRS.AspNetCore.Mvc var queryDiscovery = this.serviceProvider.GetRequiredService(); foreach (var f in queryDiscovery.GetQueries()) { + var ignoreAttribute = f.QueryType.GetCustomAttribute(); + if (ignoreAttribute != null) + continue; + var controllerType = typeof(QueryController<,>).MakeGenericType(f.QueryType, f.QueryResultType); var controllerTypeInfo = controllerType.GetTypeInfo(); feature.Controllers.Add(controllerTypeInfo); diff --git a/PoweredSoft.CQRS.sln b/PoweredSoft.CQRS.sln index 379fbe1..0271202 100644 --- a/PoweredSoft.CQRS.sln +++ b/PoweredSoft.CQRS.sln @@ -13,6 +13,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoweredSoft.CQRS.AspNetCore EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "Demo\Demo.csproj", "{F15B1E11-8D4C-489E-AFF7-AA144105FE46}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{617BA357-1A1F-40C5-B19A-A65A960E6142}" + ProjectSection(SolutionItems) = preProject + LICENSE = LICENSE + README.md = README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/README.md b/README.md new file mode 100644 index 0000000..0485422 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# CQRS + +Our implementation of query and command responsability segregation (CQRS). + +## Getting Started + +> Install nuget package to your awesome project. + +| Full Version | NuGet | NuGet Install | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -----------------------------------------------------: | +| PoweredSoft.CQRS.Abstractions | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.CQRS.Abstractions.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.CQRS.Asbtractions/) | ```PM> Install-Package PoweredSoft.CQRS.Abstractions ``` | +| PoweredSoft.CQRS | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.CQRS.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.CQRS/) | ```PM> Install-Package PoweredSoft.CQRS ``` | +| PoweredSoft.CQRS.AspNetCore.Abstractions | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.CQRS.AspNetCore.Abstractions.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.CQRS.AspNetCore.Abstractions/) | ```PM> Install-Package PoweredSoft.CQRS.AspNetCore.Abstractions ``` | +| PoweredSoft.CQRS.AspNetCore | [![NuGet](https://img.shields.io/nuget/v/PoweredSoft.CQRS.AspNetCore.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/PoweredSoft.CQRS.AspNetCore/) | ```PM> Install-Package PoweredSoft.CQRS.AspNetCore ``` | \ No newline at end of file