Filtering with Many to Many case #170
-
|
I have 2 EF Entities like this And here is my mapper It can run but the result is incorrect, here's the generated SQL So please help me to create the correct mapper. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hi @khoavn, .AddMap("groupName", q => q.Groups.Select(g => g.Name)); |
Beta Was this translation helpful? Give feedback.
-
|
apparently, this query is not supported by EntityFramework: _dbContext.Users.Where(u => u.Groups != null && u.Groups.Any(g => g.Name == "test")).ToQueryString();but this is supported, _dbContext.Users.Where(u => u.Groups.Any(g => g.Name == "test")).ToQueryString();In the next version of the As a workaround for now, I would suggest disabling the null checks in your global configurations GridifyGlobalConfiguration.DisableNullChecks = true; |
Beta Was this translation helpful? Give feedback.
apparently, this query is not supported by EntityFramework:
but this is supported,
In the next version of the
Gridify.EntityFrameworkpackage, this issue will be addressed. (please follow issue #173)As a workaround for now, I would suggest disabling the null checks in your global configurations