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

            NetsuiteEntry = await _context.NetsuiteEntry.FirstOrDefaultAsync(m => m.Id == id);

            if (NetsuiteEntry == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemple #2
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            NetsuiteEntry = await _context.NetsuiteEntry.FindAsync(id);

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

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