14 lines
No EOL
432 B
C#
14 lines
No EOL
432 B
C#
using Autofac;
|
|
using PlanTempus.Components.Users.Create;
|
|
using PlanTempus.Core.CommandQueries;
|
|
|
|
namespace PlanTempus.Components;
|
|
|
|
public class CommandHandler(IComponentContext context) : ICommandHandler
|
|
{
|
|
public async Task<CommandResponse> Handle<TCommand>(TCommand command) where TCommand : ICommand
|
|
{
|
|
var handler = context.Resolve<ICommandHandler<TCommand>>();
|
|
return await handler.Handle(command);
|
|
}
|
|
} |