Skip to content
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

Problem in convert variables that the name contains 'ID' #4

Closed
ehsanasgarian opened this issue Dec 5, 2020 · 2 comments
Closed

Problem in convert variables that the name contains 'ID' #4

ehsanasgarian opened this issue Dec 5, 2020 · 2 comments

Comments

@ehsanasgarian
Copy link

..
myObject.Id = 100;
DB.Query(d => d.ObjId == myObject.Id);
must be equivalent to :
DB.Query("WHERE [ObjId] = @0", myObject.Id) or DB.Query("WHERE [ObjId] = 100")
but it convert to :
DB.Query("WHERE [ObjId]= Id")
??

@asherber
Copy link
Owner

asherber commented Dec 6, 2020

This was a bug in the underlying StaTypPocoQueries library: see d-p-y/statically-typed-poco-queries#7

It was fixed in v1.11.0 of that library last month. This library only requires StaTypPocoQueries >= 1.9, so you'll need to directly add a reference to 1.11.0 in order to get the new behavior. I can reproduce the behavior you see in 1.9, but it works for me in 1.11.

@ehsanasgarian
Copy link
Author

Thanks for addressing this issue so promptly.

@asherber asherber closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants