diff --git a/README.md b/README.md index e41c42d..058325b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,11 @@ Add the OfX to your service configuration to register OfX: builder.Services.AddOfX(cfg => { cfg.AddAttributesContainNamespaces(typeof(WhereTheAttributeDefined).Assembly); - cfg.AddHandlersFromNamespaceContaining(); <- Add this one when you want to self-handle the request as the example at the end of this guide. Otherwise, if you install the package OfX-gRPC, there is no need to add this one anymore! + cfg.AddHandlersFromNamespaceContaining(); //<- Add this one when you want to self-handle the request as the example at the end of this guide. Otherwise, if you install the package OfX-gRPC, there is no need to add this one anymore! + cfg.AddReceivedPipelines(c => + { + c.OfType(typeof(GenericPipeline<>)).OfType(); + }); }); ``` @@ -57,9 +61,9 @@ The Attribute should be inherited from `OfXAttribute` will be scanned! Parameters: `Assembly`: The assembly containing the (OfX) attributes. -#### RegisterHandlersContainsAssembly +#### AddHandlersFromNamespaceContaining -Registers assemblies that contain handlers responsible for processing queries or commands for data retrieval. +Add assemblies that contain handlers responsible for processing queries or commands for data retrieval. Handlers are the execution units that resolve attributes applied to models. @@ -69,11 +73,23 @@ Parameters: `Type`: A marker type within the assembly that includes the handler implementations. Example: ```csharp -cfg.AddHandlersFromNamespaceContaining(); +cfg.AddReceivedPipelines(c => + { + c.OfType(typeof(GenericPipeline<>)).OfType(); + }); ``` Here, `AddHandlersFromNamespaceContaining` is a type within the assembly where your handler logic resides. +#### AddReceivedPipelines +When you want to create some pipelines to handle the request of some attribute. +Parameters: +`Action`: add the pipelines. +Example: +```csharp +cfg.AddHandlersFromNamespaceContaining(); +``` + ### 2. Integrate the Attribute into Your Model, Entity, or DTO Apply the attribute to your properties like this: ```csharp diff --git a/src/OfX.EntityFrameworkCore/OfX.EntityFrameworkCore.csproj b/src/OfX.EntityFrameworkCore/OfX.EntityFrameworkCore.csproj index 7ac4b04..4c49708 100644 --- a/src/OfX.EntityFrameworkCore/OfX.EntityFrameworkCore.csproj +++ b/src/OfX.EntityFrameworkCore/OfX.EntityFrameworkCore.csproj @@ -4,7 +4,7 @@ enable net9.0;net8.0 default - 3.0.5 + 3.1.0 Quy Vu OfX-EFCore OfX extension. Use EntityFramework as Data Querying diff --git a/src/OfX.Grpc/OfX.Grpc.csproj b/src/OfX.Grpc/OfX.Grpc.csproj index 79fbebc..dfb49f3 100644 --- a/src/OfX.Grpc/OfX.Grpc.csproj +++ b/src/OfX.Grpc/OfX.Grpc.csproj @@ -4,7 +4,7 @@ enable net9.0;net8.0 default - 3.0.5 + 3.1.0 Quy Vu OfX-gRPC OfX extension. Use gRPC as Data transporting diff --git a/src/OfX/OfX.csproj b/src/OfX/OfX.csproj index dfd18d0..8324814 100644 --- a/src/OfX/OfX.csproj +++ b/src/OfX/OfX.csproj @@ -4,7 +4,7 @@ enable net9.0;net8.0 default - 3.0.5 + 3.1.0 Quy Vu OfX The high performance and easiest way to play with microservices for .NET