コード例 #1
0
        public ActionResult Create(Users user)
        {
            MVCDemoContext context = new MVCDemoContext();

            context.Users.Add(user);
            context.SaveChanges();
            return(Content("Registration Successful"));
        }
コード例 #2
0
        // GET: Users
        public ActionResult Profile(Users user)
        {
            MVCDemoContext context = new MVCDemoContext();
            Users          found   = context.Users.Find(user.Id);

            if (found == null)
            {
                return(Content("Id Password does not match"));
            }
            return(View(found));
        }