public async Task <IActionResult> Create([Bind("Id,SoftwareName,VersionNum,LinkToSoftware")] Software software)
        {
            if (ModelState.IsValid)
            {
                _context.Add(software);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(software));
        }
Exemple #2
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,ItemCheckedOut")] Professor professor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(professor);
                await _context.SaveChangesAsync();

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