ASP.NET
- 2 ответа
- 0 вопросов
0
Вклад в тег
movies.Where(x => x.Actors.Split(',').Contains(movieActors));
movies.Where(x => !String.IsNullOrEmpty(x.Actors) && x.Actors.Split(',').Contains(movieActors));
movies.Where
(
x =>
!String.IsNullOrEmpty(x.Actors) &&
x.Actors.Split(',').Any((actor) => actor.Equals(movieActors))
);
movies.Where(x => !String.IsNullOrEmpty(x.Actors) && x.Actors.Split(',').IndexOf(movieActors) != -1);
movies.Where
(
x =>
!String.IsNullOrEmpty(x.Actors) &&
x.Actors.Split(',').Select(a => a.Trim()).Any((actor) => actor.Equals(movieActors))
);
movies.ToList().Where
(
x =>
!String.IsNullOrEmpty(x.Actors) &&
x.Actors.Split(',').Select(a => a.Trim()).Any((actor) => actor.Equals(movieActors))
);
movies = movies.Where(x => x.Actors.Contains(movieActors));