public IActionResult Edit(int id, DifficultyLevelsDataModel difficultyLevels)
        {
            if (id != difficultyLevels.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _difficultyLevelsService.Edit(difficultyLevels);
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (_difficultyLevelsService.GetById(difficultyLevels.Id) == null)
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(difficultyLevels));
        }
 public IActionResult Create(DifficultyLevelsDataModel difficultyLevels)
 {
     if (ModelState.IsValid)
     {
         _difficultyLevelsService.Add(difficultyLevels);
         return(RedirectToAction(nameof(Index)));
     }
     return(View(difficultyLevels));
 }
 public void Edit(DifficultyLevelsDataModel model)
 {
     _difficultyLevelsOperations.Edit(model);
 }
 public void Add(DifficultyLevelsDataModel difficultyLevels)
 {
     _difficultyLevelsOperations.Add(difficultyLevels);
 }