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;
 }
예제 #3
0
 public ProductsController(
     IGetAllUseCase getAllUseCase,
     IGetByIdUseCase getByIdUseCase,
     ICreateUseCase createUseCase,
     IUpdateUseCase updateUseCase)
 {
     _getAllUseCase  = getAllUseCase;
     _getByIdUseCase = getByIdUseCase;
     _createUseCase  = createUseCase;
     _updateUseCase  = updateUseCase;
 }
예제 #4
0
        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());
        }