Ejemplo n.º 1
0
        public static async Task <IActionResult> ProcessCommandAsync(IAggregateRoot ar, DomainCommand c)
        {
            var result = await ar.HandleGenericCommandAsync(c, CancellationToken.None);

            if (result.IsSuccess)
            {
                return(new OkResult());
            }
            else
            {
                return(new BadRequestObjectResult(result.Errors));
            }
        }