public async Task <IActionResult> Delete(string id) { var option = await optionService.GetByIdAsync(id); if (option == null) { return(NotFound()); } await optionsService.DeleteOptionAsync(option.ParentId, id); await optionService.DeleteAsync(id); return(NoContent()); }