public async Task <IActionResult> DeleteConfirmed(int?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            await _variantRepository.DeleteVariant(id.Value);

            await _variantRepository.SaveChanges();

            if (id.Value == VariantViewModel.ActiveVariantId)
            {
                VariantViewModel.ActiveVariantId = null;
            }
            return(RedirectToAction(nameof(Index)));
        }