public ToDoItemsController(ICreateUseCase createUseCase, IListUseCase listUseCase, IDoUseCase doUseCase, IUndoUseCase undoUseCase, IRemoveUseCase removeUseCase) { _createUseCase = createUseCase; _listUseCase = listUseCase; _doUseCase = doUseCase; _undoUseCase = undoUseCase; _removeUseCase = removeUseCase; }
public CustomerOrdersController( ICreateUseCase createUseCase, IUserService UserService, IHttpContextAccessor httpContextAccessor) { _createUseCase = createUseCase; _userService = UserService; _httpContextAccessor = httpContextAccessor; }
public ProductsController( IGetAllUseCase getAllUseCase, IGetByIdUseCase getByIdUseCase, ICreateUseCase createUseCase, IUpdateUseCase updateUseCase) { _getAllUseCase = getAllUseCase; _getByIdUseCase = getByIdUseCase; _createUseCase = createUseCase; _updateUseCase = updateUseCase; }
public async ValueTask <IActionResult> Post([FromBody] PostRequest value, [FromServices] ICreateUseCase createUseCase) { var _customerId = await createUseCase.ExecuteAsync(MapperToCustomerEntity(value)); if (_customerId != Guid.Empty) { return(Created(nameof(Get), new PostResponse() { Id = _customerId })); } return(BadRequest()); }