コード例 #1
0
        public CaseItemsController(CaseItemRepository caseitemRepository)
        {
            this.caseitemRepository = caseitemRepository;

            this.casecategoryRepository = new CaseCategoryRepository();

            this.CaseVotingRepository = new CaseVotingRepository();

            this.caseVotingRepository = new CaseVotingRepository();
            this.caseVoteRepository = new CaseVoteRepository();
            this.casesignupRepository = new CaseSignUpRepository();

            this.caseCommentRepository = new CaseCommentRepository();
            this.caselikeRepository = new CaseLikeRepository();

            this.recieverresponseRepository = new RecieverResponseRepository();

            this.caseimageRepository = new CaseImageRepository();
        }
コード例 #2
0
        public ActionResult CreateComment(CaseComment caseComment)
        {
            if (ModelState.IsValid)
            {
                var casecommentRepository = new CaseCommentRepository();
                casecommentRepository.InsertOrUpdate(caseComment);
                casecommentRepository.Save();

                return RedirectToAction("Details", new { id = caseComment.caseID });
            }
            return RedirectToAction("Index");
        }