public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Payroll = await _context.Payroll .Include(p => p.Employee).SingleOrDefaultAsync(m => m.PayrollId == id); if (Payroll == null) { return(NotFound()); } ViewData["EmployeeId"] = new SelectList(_context.Set <Employee>(), "EmployeeId", "EmployeeId"); return(Page()); }
public IActionResult OnGet() { ViewData["EmployeeId"] = new SelectList(_context.Set <Employee>(), "EmployeeId", "EmployeeId"); return(Page()); }