コード例 #1
0
        public async Task <IActionResult> Approve(int id)
        {
            DBAccess db   = new DBAccess();
            var      user = await _context.Users.FindAsync(id);

            db.ApproveUser(id);

            _context.Users.Remove(user);
            await _context.SaveChangesAsync();

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