public async Task <IActionResult> OnPostAsync(string appId) { if (appId == null) { return(NotFound()); } MddApplication = await _context.MddApplications .Include(a => a.UmlUseCases) .ThenInclude(b => b.MddComponents) .ThenInclude(c => c.MddProperties) .Include(a => a.UmlUseCases) .ThenInclude(b => b.Associations) .Include(a => a.CloudProviders) .Include(a => a.UmlModels) .SingleOrDefaultAsync(m => m.Id == appId); if (MddApplication != null) { _context.MddApplications.Remove(MddApplication); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnGetAsync(string appId) { if (appId == null) { return(NotFound()); } MddApplication = await _context.MddApplications.FirstOrDefaultAsync(m => m.Id == appId); if (MddApplication == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(string appId) { if (appId == null) { return(NotFound()); } MddApplication = await _context.MddApplications .Include(m => m.UmlUseCases) .ThenInclude(m => m.Associations) .Include(m => m.UmlUseCases) .ThenInclude(m => m.MddComponents) .FirstOrDefaultAsync(m => m.Id == appId); if (MddApplication == null) { return(NotFound()); } return(Page()); }