Ejemplo n.º 1
0
        public IActionResult OnPost(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Application = _context.Applications.First(a => a.AppId == id);

            if (Application != null)
            {
                _context.Remove(Application);
                _context.SaveChanges();
            }

            return(RedirectToPage("./Index"));
        }
Ejemplo n.º 2
0
        public IActionResult OnPost(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Dashboard = _context.Dashboards.First(d => d.DashboardId == id);

            if (Dashboard != null)
            {
                _context.Remove(Dashboard);
                _context.SaveChanges();
            }

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