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

How to add an extension on a IQueryable with Nein-Linq ? #6

Closed
plasmaboyer opened this issue Aug 20, 2017 · 1 comment
Closed

How to add an extension on a IQueryable with Nein-Linq ? #6

plasmaboyer opened this issue Aug 20, 2017 · 1 comment
Labels

Comments

@plasmaboyer
Copy link

plasmaboyer commented Aug 20, 2017

Hi,

Imagine this query:

var query = context.Users.Where(u=>u.IsActive()); //Using Nein-Linq

i would like to do:

var query = context.Users.AreActives();

with

public static class UserExtensions { public static IQueryable<User> AreActives(this IQueryable<User> query){ return null; //to be completed } }

can you help me to complete my method working with nein-linq please ?

Regards,
AB

@plasmaboyer
Copy link
Author

I found my answer : add System.Linq.Queryable
public static class UserExtensions { public static IQueryable<User> AreActives(this IQueryable<User> query){ return query.Where(u=>u.IsActive()); } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants