Example #1
0
        public async Task <IActionResult> OnPost([FromQuery] int year, [FromQuery] int month, [FromQuery] int day, [FromQuery] string id)
        {
            var result = await _service.DeleteAppointmentSlotAsync(id);

            if (!result.Succeeded)
            {
                ErrorMessage = result.ErrorMessage;
                return(await PageResult(year, month, day, id));
            }
            return(RedirectToPage("Index", new { year, month, day }));
        }