Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }