Working on a command dispatcher

This commit is contained in:
Janus Knudsen 2025-03-10 18:10:00 +01:00
parent 31666b4ba0
commit a86a2d7ade
5 changed files with 55 additions and 4 deletions

View file

@ -0,0 +1,13 @@
using Autofac;
using PlanTempus.Components.Users.Create;
namespace PlanTempus.Components;
public class CommandHandler(IComponentContext context) : ICommandHandler
{
public Task<TCommandResult> Handle<TCommand, TCommandResult>(TCommand command)
{
var handler = context.Resolve<ICommandHandler<TCommand, TCommandResult>>();
return handler.Handle(command);
}
}