PlanTempusApp/PlanTempus.Components/CommandHandler.cs

13 lines
399 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
{
2025-03-11 00:28:06 +01:00
public async Task<TCommandResult> Handle<TCommand, TCommandResult>(TCommand command)
2025-03-10 18:10:00 +01:00
{
var handler = context.Resolve<ICommandHandler<TCommand, TCommandResult>>();
2025-03-11 00:28:06 +01:00
return await handler.Handle(command);
2025-03-10 18:10:00 +01:00
}
}