public ActionResult DeleteBySplitId(string splitName) { List <int> idsList = StaticHelpers.GetIdsBySplitName(splitName); IEnumerable <Article> articles = _articleContext.Articles .Include(m => m.Source) .Include(n => n.Informations) .OrderBy(x => x.Date) //najstarsze .Where(m => idsList.Contains(m.Id)); if (articles == null) { return(NotFound()); } _articleContext.RemoveRange(articles); _articleContext.SaveChanges(); return(NoContent()); }