public async Task <ActionResult> OnPostAsync()
        {
            var result = await remindersService.DeleteReminder(Id);

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

            return(Page());
        }
Exemple #2
0
        public async Task <IActionResult> DeleteReminder([FromRoute] int id)
        {
            var result = await remindersService.DeleteReminder(id);

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

            return(Ok());
        }