public async Task <IActionResult> Create([Bind("GlumacFilmID")] GlumacFilm glumacFilm)
        {
            if (ModelState.IsValid)
            {
                _context.Add(glumacFilm);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(glumacFilm));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("Id,Artist,Album,Utgivning")] CDskivor cDskivor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cDskivor);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(cDskivor));
        }
        public async Task <IActionResult> Create([Bind("KorisnikID,Ime,Prezime")] Korisnik korisnik)
        {
            if (ModelState.IsValid)
            {
                _context.Add(korisnik);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(korisnik));
        }
        public async Task <IActionResult> Create([Bind("Id,Title,Author,ReleaseDate")] CD cD)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cD);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(cD));
        }
        public async Task <IActionResult> Create([Bind("ListaPregledanihID")] ListaPregledanih listaPregledanih)
        {
            if (ModelState.IsValid)
            {
                _context.Add(listaPregledanih);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(listaPregledanih));
        }
        public async Task <IActionResult> Create([Bind("ZanrID")] Zanr zanr)
        {
            if (ModelState.IsValid)
            {
                _context.Add(zanr);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(zanr));
        }
        public async Task <IActionResult> Create([Bind("ArtistId,ArtistName,ArtistAge,NumberOfAlbums")] Artist artist)
        {
            if (ModelState.IsValid)
            {
                _context.Add(artist);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(artist));
        }
        public async Task <IActionResult> Create([Bind("KomentarID,komentarTekst,datum")] Komentar komentar)
        {
            if (ModelState.IsValid)
            {
                _context.Add(komentar);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(komentar));
        }
        public async Task <IActionResult> Create([Bind("PlacanjeID,Datum,brojkartice")] Placanje placanje)
        {
            if (ModelState.IsValid)
            {
                _context.Add(placanje);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(placanje));
        }
Beispiel #10
0
        public async Task <IActionResult> Create([Bind("Id,Album,Artist,Release,Tracks")] CD cD)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cD);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(cD));
        }
Beispiel #11
0
        public async Task <IActionResult> Create([Bind("FilmID,naziv,trajanje,ocjena,godinaFilma,brojOcjena,opisFilma,reziser,cijena,poster,link")] Film film)
        {
            if (ModelState.IsValid)
            {
                _context.Add(film);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(film));
        }
        public async Task <IActionResult> Create([Bind("CDId,Title,ReleaseDate,Genre,RecordCompany,SongsAmount,ArtistId")] CD cD)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cD);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ArtistId"] = new SelectList(_context.Artist, "ArtistId", "ArtistName", cD.ArtistId);
            return(View(cD));
        }
Beispiel #13
0
        public async Task <IActionResult> Create([Bind("CDId,Artist,Title,GenreId")] CD cD)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cD);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["GenreId"] = new SelectList(_context.Genres, "GenreId", "GenreId", cD.GenreId);
            return(View(cD));
        }
Beispiel #14
0
        public async Task <IActionResult> Create([Bind("UserId,UserName,BorrowingDate,CDId")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CDId"] = new SelectList(_context.CD, "CDId", "Title", user.CDId);
            return(View(user));
        }