Example #1
0
        public async Task <IActionResult> Post(CreateCustomerCommand command)
        {
            var user = User;
            await _dispatcher.SendAsync(command.Bind(c => c.Id, UserId));

            return(CreatedAtAction(nameof(Get), new GetCustomerQuery()
            {
                Id = command.Id
            }, null));
        }
        public async Task <IActionResult> Post(CreateCustomerCommand command)
        {
            var result = await SendAsync(command.Bind(c => c.Id, UserId), resourceId : command.Id, resource : "customers");

            return(result);
        }