public async Task <ActionResult> Edit(int id, CategoryViewModel category)
        {
            category.Id = id;

            try
            {
                CategoriesClient categoriesClient = new CategoriesClient();

                var categoryDto = new CategoryDto
                {
                    Id           = category.Id,
                    NameCategory = category.NameCategory,
                    Stars        = category.Stars,
                    Subcategory  = category.Subcategory,
                    Delivery     = category.Delivery
                };

                await categoriesClient.UpdateAsync(categoryDto);

                await categoriesClient.CloseAsync();

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }