Пример #1
0
        public async Task <IActionResult> DeleteSelectedSeNames(ICollection <string> selectedIds)
        {
            if (selectedIds != null)
            {
                var entityUrls = new List <EntityUrl>();
                foreach (var id in selectedIds)
                {
                    var entityUrl = await _slugService.GetEntityUrlById(id);

                    if (entityUrl != null)
                    {
                        entityUrls.Add(entityUrl);
                    }
                }
                foreach (var entityUrl in entityUrls)
                {
                    await _slugService.DeleteEntityUrl(entityUrl);
                }
            }

            return(Json(new { Result = true }));
        }