コード例 #1
0
        public async Task <IActionResult> Create([Bind("ID,Title,Address,Ganr,Rating")] Music music)
        {
            if (ModelState.IsValid)
            {
                _context.Add(music);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(music));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("ID,Title,Address,Classif,Rating")] Kults kults)
        {
            if (ModelState.IsValid)
            {
                _context.Add(kults);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(kults));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("ID,Title,Address,SrChek,Lamp,Rating")] Lounge lounge)
        {
            if (ModelState.IsValid)
            {
                _context.Add(lounge);
                await _context.SaveChangesAsync();

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