public async Task <bool> Handle(CreateLockRequest message, IOutputPort <CreateLockResponse> outputPort)
        {
            var company = await _companyRepository.GetByIdAsync(message.CompanyId);

            if (company != null)
            {
                var entityLock = new Lock
                {
                    Name     = message.Name,
                    IsLocked = true,
                    Company  = company,
                    Created  = DateTime.UtcNow,
                };

                var dbLock = await _lockRepository.AddAsync(entityLock);

                outputPort.Handle(new CreateLockResponse(dbLock, true));

                return(true);
            }

            outputPort.Handle(new CreateLockResponse(true, "Company does not exist."));

            return(false);
        }
        public async Task <IActionResult> CreateLock([FromBody] CreateLockRequest request)
        {
            await _createLockUseCase.Handle(new CreateLockRequest(request.Name, request.CompanyId), _createLockPresenter);

            return(_createLockPresenter.Result);
        }