stepa
stepa
CC#
Created by stepa on 12/26/2023 in #help
need help with ef
I need to display movies that star one specific actor
4 replies
CC#
Created by stepa on 12/26/2023 in #help
need help with ef
System.InvalidOperationException: The LINQ expression 'DbSet<Film>()
.OrderByDescending(f => f.Id)
.Where(f => MaterializeCollectionNavigation(
Navigation: Film.Actors,
subquery: DbSet<Dictionary<string, object>>("ActorFilm")
.Where(a => EF.Property<int?>(f, "Id") != null && object.Equals(
objA: (object)EF.Property<int?>(f, "Id"),
objB: (object)EF.Property<int?>(a, "FilmsId")))
.Join(
inner: DbSet<Actor>(),
outerKeySelector: a => (object)EF.Property<int?>(a, "ActorsId"),
innerKeySelector: a0 => (object)EF.Property<int?>(a0, "Id"),
resultSelector: (a, a0) => new TransparentIdentifier<Dictionary<string, object>, Actor>(
Outer = a,
Inner = a0
))
.Select(ti => ti.Inner)) != null && DbSet<Dictionary<string, object>>("ActorFilm")
.Where(a1 => EF.Property<int?>(f, "Id") != null && object.Equals(
objA: (object)EF.Property<int?>(f, "Id"),
objB: (object)EF.Property<int?>(a1, "FilmsId")))
.Join(
inner: DbSet<Actor>(),
outerKeySelector: a1 => (object)EF.Property<int?>(a1, "ActorsId"),
innerKeySelector: a2 => (object)EF.Property<int?>(a2, "Id"),
resultSelector: (a1, a2) => new TransparentIdentifier<Dictionary<string, object>, Actor>(
Outer = a1,
Inner = a2
))
.Any(ti0 => __Functions_0
.Like(
matchExpression: ti0.Inner.Name,
pattern: __Format_1)))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
System.InvalidOperationException: The LINQ expression 'DbSet<Film>()
.OrderByDescending(f => f.Id)
.Where(f => MaterializeCollectionNavigation(
Navigation: Film.Actors,
subquery: DbSet<Dictionary<string, object>>("ActorFilm")
.Where(a => EF.Property<int?>(f, "Id") != null && object.Equals(
objA: (object)EF.Property<int?>(f, "Id"),
objB: (object)EF.Property<int?>(a, "FilmsId")))
.Join(
inner: DbSet<Actor>(),
outerKeySelector: a => (object)EF.Property<int?>(a, "ActorsId"),
innerKeySelector: a0 => (object)EF.Property<int?>(a0, "Id"),
resultSelector: (a, a0) => new TransparentIdentifier<Dictionary<string, object>, Actor>(
Outer = a,
Inner = a0
))
.Select(ti => ti.Inner)) != null && DbSet<Dictionary<string, object>>("ActorFilm")
.Where(a1 => EF.Property<int?>(f, "Id") != null && object.Equals(
objA: (object)EF.Property<int?>(f, "Id"),
objB: (object)EF.Property<int?>(a1, "FilmsId")))
.Join(
inner: DbSet<Actor>(),
outerKeySelector: a1 => (object)EF.Property<int?>(a1, "ActorsId"),
innerKeySelector: a2 => (object)EF.Property<int?>(a2, "Id"),
resultSelector: (a1, a2) => new TransparentIdentifier<Dictionary<string, object>, Actor>(
Outer = a1,
Inner = a2
))
.Any(ti0 => __Functions_0
.Like(
matchExpression: ti0.Inner.Name,
pattern: __Format_1)))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
4 replies