public async Task <ActionResult> Edit([FromRoute] int id, [FromForm] ProcessorCoreDtoViewModel processorCore)
        {
            var dto = _mapper.Map <ProcessorCoreDtoViewModel, ProcessorCoreUpdateDto>(processorCore);

            var result =
                await _processorCoresManagingService.UpdateProcessorCoreAsync(id, dto, HttpContext.GetJwtTokenFromCookie());

            return(!result?RedirectToAction("ServerErrorIndex", "Error") : RedirectToAction("ProcessorCoresTable"));
        }
        public async Task <ActionResult> Create([FromForm] ProcessorCoreDtoViewModel processorCore)
        {
            var dto = _mapper.Map <ProcessorCoreDtoViewModel, ProcessorCoreInsertDto>(processorCore);

            var insertResult =
                await _processorCoresManagingService.CreateProcessorCoreAsync(dto, HttpContext.GetJwtTokenFromCookie());

            if (insertResult)
            {
                return(RedirectToAction("ProcessorCoresTable"));
            }

            return(Problem());
        }