예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,name,price,eventDate,genre,minimalAge,performers,ticketsCounter,club,imageUrl")] Party party)
        {
            if (ModelState.IsValid)
            {
                _context.Add(party);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(party));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("Id,SpotifyId")] Performer performer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(performer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(performer));
        }