Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            Objective = await _context.GetObjectiveAsync(id);

            if (Objective == null)
            {
                return(NotFound());
            }

            return(Page());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var objectiveID = id ?? default(int);

            Objective = await _context.GetObjectiveAsync(objectiveID);

            if (Objective == null)
            {
                return(NotFound());
            }
            return(Page());
        }