public IActionResult OnGet(int id) { var userId = userManager.GetUserId(User); var result = babiesService.GetBaby(id, userId); EditBaby = result; return(Page()); }
public IActionResult GetBaby([FromRoute] int id, string userId) { var result = babiesService.GetBaby(id, userId); if (result == null) { return(NotFound()); } return(Ok(result)); }