public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            JobPosition = await _context.JobPositions.FindAsync(id);

            if (JobPosition != null)
            {
                _context.JobPositions.Remove(JobPosition);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Advertisement = await _context.Advertisements.FindAsync(id);

            if (Advertisement != null)
            {
                _context.Advertisements.Remove(Advertisement);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }