-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working as expected, when using IQueryProvider.CreateQuery #429
Comments
Adding, this would solve the constructor issue but it's going into the exception of "The root attribute of a Redis Collection must be decorated with a DocumentAttribute"... perhaps adding a more generic constructor would help 🤔 ? object[] args = new object[] { Connection, _saveState, _chunkSize };
return (IQueryable)Activator.CreateInstance(typeof(RedisCollection<>).MakeGenericType(elementType), args); |
I'm encountering the same issue with AutoMapper:
The issue is related to the implementation of the RedisQueryProvider.CreateQuery(Expression) method:
There are no valid constructors for RedisCollection(RedisQueryProvider, Expression). You can reproduce the issue with the following code:
StackTrace:
The fix seems straightforward - we can take the implementation from the CreateQuery(Expression) method and adapt it. Here is the code:
What do you think? |
I am using Automapper to map internal object to a DTO, however it is throwing
System.MissingMethodException: 'Constructor on type 'Redis.OM.Searching.RedisCollection
1[[System.Linq.IQueryable
1[[CustomerDTO, Redis_Graphql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Linq.Expressions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]]' not found.'on
runable code:
The text was updated successfully, but these errors were encountered: