public IActionResult AddUrgency(UrgencyAddDto model)
        {
            if (ModelState.IsValid)
            {
                _urgencyService.Create(new Urgency
                {
                    Description = model.Description,
                });

                return(RedirectToAction("Index"));
            }

            return(View(model));
        }
示例#2
0
        public IActionResult AddUrgency(UrgencyAddDTO model)
        {
            if (ModelState.IsValid)
            {
                var urgency = new Urgency()
                {
                    Title = model.Title
                };

                _urgencyService.Create(urgency);
                return(RedirectToAction("Index"));
            }

            return(View(model));
        }