예제 #1
0
        public IActionResult DeleteConfirmed(int id)
        {
            ViewBag.thisResponse = responseRepo.Responses
                                   .Include(p => p.Project)
                                   .ThenInclude(m => m.Module)
                                   .ThenInclude(q => q.QUESTOR)
                                   .FirstOrDefault(x => x.ResponseId == id);
            var      response     = responseRepo.Responses.FirstOrDefault(x => x.ResponseId == id);
            Response thisResponse = responseRepo.Responses.FirstOrDefault(x => x.ResponseId == id);

            responseRepo.Remove(thisResponse);
            return(RedirectToAction("Edit", "QUESTORs", new { id = ViewBag.thisResponse.Project.Module.QUESTORId }));
        }