Deprecated: Function is_staging_site is deprecated since version 3.3.0! Use in_safe_mode instead. in /home/seotoolh/public_html/memorypointer.com/wp-includes/functions.php on line 5453
Add a conditional where clause to LINQ Query | MemoryPointer.com
Deprecated: Function is_staging_site is deprecated since version 3.3.0! Use in_safe_mode instead. in /home/seotoolh/public_html/memorypointer.com/wp-includes/functions.php on line 5453

Add a conditional where clause to LINQ Query

0
Fetching all users

var query = from u in context.users
select u;

Add a condition to filter it by user


if (Selected)
query = query.Where(u => u.user_id == userID);

Get Free Email Updates!

Signup now and receive free offers, discounts & coupon codes

I agree to have my personal information transfered to Mad Mimi ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.