public ActionResult UpdatePriority(PriorityUpdateDto priorityUpdateDto)
        {
            var priorityModel = _repository.GetPriorityById(priorityUpdateDto.PriorityID);

            if (priorityModel == null)
            {
                return(NotFound());
            }
            _mapper.Map(priorityUpdateDto, priorityModel);
            _repository.UpdatePriority(priorityModel);
            _repository.SaveChanges();
            return(NoContent());
        }
 public IActionResult UpdatePriority(PriorityUpdateDto model)
 {
     if (ModelState.IsValid)
     {
         _priorityService.Update(new Priority
         {
             Id = model.Id,
             Definition = model.Defination
         });
         return RedirectToAction("Index");
     }
     return View(model);
 }