public async Task <IActionResult> DeleteSleeping([FromRoute] int id)
        {
            var result = await sleepingsService.DeleteSleeping(id);

            if (result == "Error")
            {
                return(NotFound());
            }

            return(Ok());
        }
Exemple #2
0
        public async Task <ActionResult> OnPostAsync()
        {
            var result = await sleepingsService.DeleteSleeping(Id);

            if (result == "Ok")
            {
                return(RedirectToPage("/Babies/Babies"));
            }

            return(Page());
        }