public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } TransactionEntry = await _context.Transactions .Include(t => t.ApplicationUser).SingleOrDefaultAsync(m => m.ID == id); if (TransactionEntry == null) { return(NotFound()); } ViewData["ApplicationUserID"] = new SelectList(_context.Set <ApplicationUser>(), "Id", "Id"); return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } BudgetEntry = await _context.Budget .Include(b => b.Category).SingleOrDefaultAsync(m => m.ID == id); if (BudgetEntry == null) { return(NotFound()); } ViewData["ApplicationUserID"] = new SelectList(_context.Set <ApplicationUser>(), "Id", "Id"); ViewData["CategoriesID"] = new SelectList(_context.Categories, "ID", "ID"); return(Page()); }