hassanhabib / restfullinq Goto Github PK
View Code? Open in Web Editor NEWRESTFulLinq is an easy way to send LINQ queries to your API fluently
RESTFulLinq is an easy way to send LINQ queries to your API fluently
Hi Hassan.
Thank you for RestfulLinq! I have a problem with it if I try to filter by custom enum
inside of Where
construction. This is my sandbox project: https://github.com/Andrey-Bushman/odata-and-restfullinq-sandbox . My controller has two actions. One of them uses RestfilLinq (second uses odata). For /api/Persons/ByLinq
endpoint I try to use linq: Where(n => n.Gender == PersonModel.Models.Gender.Male)
but I get the exception:
The name 'PersonModel' does not exist in the current context
If I try to do the same without namespace: Where(n => n.Gender == Gender.Male)
then I get the exception:
The name 'Gender' does not exist in the current context
If I cast enum
to int
then it works fine in Swagger UI: Where(n => (int) n.Gender == 0)
, but doesn't work in my C# code (look the comment in my xunit test, please):
error CS1955: Non-invocable member 'Convert' cannot be used like a method.
What I did wrong? Thank you.
Hi,
I read about your nice Linq project in reddit and my first concern was the code injection part.
In our company we also use script code and use roslyn to parse the script code to check all type usages against a list of permitted types.
I extracted the responsible code into the github repository ScriptVerifier.
Maybe it helps as a starter or can be used in combination with your linq script compilation.
Regards
Ralf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.