Skip to content
This repository was archived by the owner on Feb 1, 2025. It is now read-only.

Commit 77c0ece

Browse files
committed
Merge branch 'master' into release
2 parents 6f26fa4 + 816204b commit 77c0ece

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Source/LinqToDB.EntityFrameworkCore/LinqToDBForEFToolsImplDefault.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ Expression LocalTransform(Expression e)
648648
var filter = model?.FindEntityType(entityType).QueryFilter;
649649
if (filter != null)
650650
{
651+
var filterBody = filter.Body.Transform(l => LocalTransform(l));
652+
filter = Expression.Lambda(filterBody, filter.Parameters[0]);
651653
var whereExpr = Expression.Call(null, WhereMethodInfo.MakeGenericMethod(entityType), newExpr, Expression.Quote(filter));
652654

653655
newExpr = whereExpr;

Tests/LinqToDB.EntityFrameworkCore.Tests/Models/AdventuresWorks/AdventureWorksContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
108108

109109
entity.Property(e => e.rowguid).HasDefaultValueSql("newid()");
110110

111-
entity.HasQueryFilter(e => e.Weight != null);
111+
entity.HasQueryFilter(e => e.Weight != null || EF.Property<decimal?>(e, "Weight") != null);
112112
});
113113

114114
modelBuilder.Entity<ProductCategory>(

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ branches:
1010
- /dev.*/
1111

1212
environment:
13-
assemblyVersion: 1.5.1
14-
packageVersion: 1.5.1
13+
assemblyVersion: 1.5.2
14+
packageVersion: 1.5.2
1515
access_token:
1616
secure: IlfmHXRdUK6v8dX/WqieXQ==
1717

0 commit comments

Comments
 (0)