public async Task <IActionResult> Create([Bind("ID,FirstName,LastName,Sex,Email,PhoneNumber,State")] Donator donator)
        {
            if (ModelState.IsValid)
            {
                _context.Add(donator);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(donator));
        }
        public async Task <IActionResult> Create([Bind("ID,DateDonated")] Record @record)
        {
            if (ModelState.IsValid)
            {
                _context.Add(@record);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(@record));
        }
Beispiel #3
0
        public async Task <IActionResult> Create([Bind("Email,Pass,FirstName,LastName,CanUpdateRecords")] Accounts accounts)
        {
            if (ModelState.IsValid)
            {
                _context.Add(accounts);
                await _context.SaveChangesAsync();

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