public IActionResult Create(Dictionary <Guid, int> request) { var user = _userService.GetUser(_httpContextAccessor.HttpContext); var customerId = user.CustomerId; var input = new CreateInput(customerId, request); var orderId = _createUseCase.Execute(input); return(Ok(orderId)); }
public IActionResult Create([FromBody] CreateToDoItemViewModel request) { try { var id = _createUseCase.Execute(request.Name); return(Ok(id)); } catch (BusinessException ex) { return(BadRequest(ex.Message)); } }
// [Authorize] public IActionResult Create(CreateProductRequest request) { var input = new CreateInput { Id = request.Id, Name = request.Name, Description = request.Description }; var productId = _createUseCase.Execute(input); return(Ok(productId)); }