예제 #1
0
        public async Task <IActionResult> Create([Bind("Mjr,ID,FName,LName,Email,PhoneNumb")] Member member)
        {
            if (ModelState.IsValid)
            {
                _context.Add(member);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(member));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("ID,ProjName,ProjDescript")] Project project)
        {
            if (ModelState.IsValid)
            {
                _context.Add(project);
                await _context.SaveChangesAsync();

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