public ActionResult Create([Bind(Include = "genre_id,genre_title")] genres genres) { if (ModelState.IsValid) { db.genres.Add(genres); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(genres)); }
public ActionResult Create([Bind(Include = "show_id,show_title,num_seasons,initial_year")] shows shows) { if (ModelState.IsValid) { db.shows.Add(shows); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(shows)); }
public ActionResult Create([Bind(Include = "person_id,first_name,last_name,account_type,dob,compress_pass,hash_pass,enc_pass")] people people) { if (ModelState.IsValid) { db.people.Add(people); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(people)); }
public ActionResult Create([Bind(Include = "character_id,character_name,race_id")] characters characters) { if (ModelState.IsValid) { db.characters.Add(characters); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(characters)); }
public ActionResult Create([Bind(Include = "id,firstname,lastname")] director director) { if (ModelState.IsValid) { db.director.Add(director); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(director)); }
public ActionResult Create([Bind(Include = "race_id,race_name")] races races) { if (ModelState.IsValid) { db.races.Add(races); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(races)); }
public ActionResult Create([Bind(Include = "product_id,product_name,product_category,product_price,product_sku,short_description,idx_sku,idx_names,idx_sku_three")] products products) { if (ModelState.IsValid) { db.products.Add(products); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(products)); }
public ActionResult Create([Bind(Include = "movie_id,movie_title,director,year,genre_id")] movies movies) { if (ModelState.IsValid) { db.fillmoviesTable(movies.director, movies.genre_id, movies.movie_id, movies.movie_title, movies.year); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(movies)); }
public ActionResult Create([Bind(Include = "movie_id,movie_title,director,year,genre_id")] MoviesTable moviesTable) { if (ModelState.IsValid) { db.MoviesTable.Add(moviesTable); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(moviesTable)); }
public ActionResult Create([Bind(Include = "tv_id,tv_title,num_seasons")] tv tv) { if (ModelState.IsValid) { db.tv.Add(tv); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tv)); }
public ActionResult Register(User registeruser) { if (ModelState.IsValid) { bool isValidUser = entity.Users.Any(u => u.UserName == registeruser.UserName || u.EmailId == registeruser.EmailId || u.PhoneNumber == registeruser.PhoneNumber); if (!isValidUser) { entity.Users.Add(registeruser); entity.SaveChanges(); return(RedirectToAction("Login")); } } ModelState.AddModelError("", "User already exist,Use another Username or Password or Email"); return(View()); }