Ejemplo n.º 1
0
        public async Task <APIResult> Insert([FromBody] InsertRoleCommand command)
        {
            var id = await mediator.Send(command);

            return(new APIResult()
            {
                Data = new { id = (id > 0) ? id : (int?)null },
                Result = (id > 0) ? 0 : -1,
            });
        }
 public async Task <IActionResult> Post(InsertRoleCommand request)
 => Ok(await _mediator.Send(request));