Esempio n. 1
0
        public ActionResult Create([Bind(Include = "ID,Title,Publisher,ReleaseTime,Content")] Infor infor)
        {
            if (ModelState.IsValid)
            {
                inforRepo.Create(infor);
                return(RedirectToAction("Index"));
            }

            return(View(infor));
        }
Esempio n. 2
0
        public ActionResult Create([Bind(Include = "ID,PowerID,Password,Name")] Member member)
        {
            if (ModelState.IsValid)
            {
                memberRepo.Create(member);
                accountService.CreateAccount(member.ID);
                return(RedirectToAction("Index"));
            }

            return(View(member));
        }