How to filter with LINQ
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 4 articles for 0.440 sec
RE: How to filter with LINQ?     

Group: microsoft.public.vsnet.general · Group Profile · Search for How to filter with LINQ in microsoft.public.vsnet.general
Author: Wen Yuan Wang [MSFT]
Date: May 13, 2008 00:52

..., It seems like you want empty textbox NOT to be taken account in the where clause, correct? If I misunderstood anything again, please don't hesitate to correct me. One way is to create Linq Query dynamically by Express Tree. But, the code will be hard to maintain and read. My suggestion is that we can check the textbox value in the conditional operator (?:). It returns one of two ...
Show full article (1.61Kb) · Show article thread
How to filter with LINQ?     

Group: microsoft.public.vsnet.general · Group Profile · Search for How to filter with LINQ in microsoft.public.vsnet.general
Author: Juan Dent
Date: May 11, 2008 23:17

Hi, I have a bunch of textboxes which might contain a value to filter, but may be also empty. I have a LINQ like so: ---- var someAdministrators = from a in db.ADMINISTRATORs where XXXXX ---- how can I incorporate the variable amount of where clauses? this is a 2 to the number of clauses problem.
Show full article (0.34Kb)
RE: How to filter with LINQ?     

Group: microsoft.public.vsnet.general · Group Profile · Search for How to filter with LINQ in microsoft.public.vsnet.general
Author: Juan Dent
Date: May 12, 2008 11:21

Hi, No, the problem is that some of these textboxes may be empty and thus should not be taken account in the where clause. This makes it an exponential combination of where sub-clauses. Is this clear? -- Thanks in advance, Juan Dent, M.Sc. ""Wen Yuan Wang [MSFT]"" wrote: Hello Juan, I'm not sure I have understood your issue completely. It seems you have a lot...
Show full article (2.34Kb) · Show article thread
RE: How to filter with LINQ?     

Group: microsoft.public.vsnet.general · Group Profile · Search for How to filter with LINQ in microsoft.public.vsnet.general
Author: Wen Yuan Wang [MSFT]
Date: May 12, 2008 03:24

Hello Juan, I'm not sure I have understood your issue completely. It seems you have a lot of textboxs which contains the value need to be used in Where case. Something likes the following: var someAdministrators = from a in db.ADMINISTRATORs where (a.c1==textbox1.value) && (a.c2==textbox2.value) && (a.c3==textbox3.value) select a; Is this what you need? Please let me know if ...
Show full article (1.97Kb) · Show article thread