PlanTempusApp/PlanTempus.Components/CommandHandler.cs

13 lines
387 B
C#
Raw Normal View History

2025-03-10 18:10:00 +01:00
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);
}
}