Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a Document-Oriented db like MongoDb to store the command #75

Open
github-actions bot opened this issue Dec 22, 2024 · 0 comments
Open

use a Document-Oriented db like MongoDb to store the command #75

github-actions bot opened this issue Dec 22, 2024 · 0 comments
Labels
todo Something we still need to do

Comments

@github-actions
Copy link

📝 Todo : ** use a Document-Oriented db like MongoDb to store the command **

Description:
We shouldn't wait for the result necessarily, as we can just fire and forget.

Code Snippet:

// ---------------------------------------------------------------------------------------------------------------------
// Imports
// ---------------------------------------------------------------------------------------------------------------------
using InfiniLore.Server.Contracts.Services.CQRS;
using MediatR;

namespace InfiniLore.Server.Services.CQRS.PipelineBehaviours.Behaviours;

// ---------------------------------------------------------------------------------------------------------------------
// Code
// ---------------------------------------------------------------------------------------------------------------------
public class StoreCommandsBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
    where TRequest : IRequest<TResponse>, ICqrsCommand
    where TResponse : notnull{

    public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken) {
        // TODO use a Document-Oriented db like MongoDb to store the command
        //      We shouldn't wait for the result necessarily, as we can just fire and forget.
        
        // Continue as normal
        TResponse response = await next();

        return response;
    }
    
}

File:

// TODO use a Document-Oriented db like MongoDb to store the command
// We shouldn't wait for the result necessarily, as we can just fire and forget.

@github-actions github-actions bot added the todo Something we still need to do label Dec 22, 2024
@github-project-automation github-project-automation bot moved this to Backlog in InfiniLore Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Something we still need to do
Projects
Status: Backlog
Development

No branches or pull requests

0 participants