Exemple #1
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Name,Password")] Users users)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(users);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(users));
        }
        public async Task <ActionResult> Create([Bind(Include = "ClubName,LigaName,HomeStad")] Clubs clubs)
        {
            if (ModelState.IsValid)
            {
                db.Clubs.Add(clubs);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(clubs));
        }