public IActionResult Create(CategoryPlatform model)
        {
            if (ModelState.IsValid)
            {
                _iuw.CategoryPlatformRepositoryUW.Create(model);
                _iuw.CategoryPlatformRepositoryUW.Save();

                ViewBag.ViewTitle      = "فرم ایجاد دسته بندی پلتفرم";
                ViewBag.SuccessMessage = "اطلاعات با موفقیت ثبت شد";
            }

            return(View(model));
        }
        public IActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            CategoryPlatform ct = _iuw.CategoryPlatformRepositoryUW.GetById(id);

            if (ct == null)
            {
                return(NotFound());
            }

            return(PartialView(ct));
        }
        public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            CategoryPlatform ct = _iuw.CategoryPlatformRepositoryUW.GetById(id);

            if (ct == null)
            {
                return(NotFound());
            }

            ViewBag.ViewTitle = "فرم ویرایش دسته بندی پلتفرم";
            return(View(ct));
        }
        public IActionResult Edit(CategoryPlatform model, int CategoryPlatformtId)
        {
            if (CategoryPlatformtId != model.CategoryPlatformtId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _iuw.CategoryPlatformRepositoryUW.Update(model);
                    _iuw.CategoryPlatformRepositoryUW.Save();
                }
                catch
                {
                    throw;
                }
            }
            ViewBag.SuccessMessage = "اطلاعات با موفقیت ویرایش شد";
            return(View(model));
        }