Example #1
0
        public async Task <IActionResult> EditPostAsync(DoctorTypeViewModel dto)
        {
            if (ModelState.IsValid)
            {
                await Service.SaveAsync(dto);
            }

            return(RedirectToAction(nameof(Index)));
        }
Example #2
0
        public async Task <IActionResult> DeletePost(DoctorTypeViewModel dto)
        {
            await Service.DeleteAsync(dto.Id);

            return(RedirectToAction(nameof(Index)));
        }