Esempio n. 1
0
        public IActionResult OnGet(int id)
        {
            var userId = userManager.GetUserId(User);
            var result = babiesService.GetBaby(id, userId);

            EditBaby = result;

            return(Page());
        }
Esempio n. 2
0
        public IActionResult GetBaby([FromRoute] int id, string userId)
        {
            var result = babiesService.GetBaby(id, userId);

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

            return(Ok(result));
        }