Instead of narrowing my intentions to gather results.
if (request .QueryString ["VenueType"] == faucet) render = _renderContext.Renders; Other {list & lt; Int & gt; PlaceTypeIds = Request.QueryString ["VenueType"]. Split (',') Select (int.Parse) .toList (); Render = _renderContext.Renders.Where (v = & gt; LocationTipeds.Source (v.VenueTypeId)); } / / Second Condition: If (Request .Jquery String ["SearchTerm"] = Faucet) Renders = Raters. Where (r = & gt; r .ite. To lower () .contact string ["search"]. ())); // Additional Clearing: If (Request.QueryString ["EventType"] = Faucet) {List & lt; Int & gt; EventTypeIds = Request.QueryString ["EventType"]. Split (',') Select (int.Parse) .toList (); Renders = renders.Where (w = & gt; eventTypeIds.Contains (wEEventTypeId)); } If (request .QueryString ["DisplayFormat"]! = Null) {List & lt; Int & gt; DisplayFormatIds = Request.QueryString ["DisplayFormat"]. Split (',') Select (int.Parse) .toList (); Renders = renders.Where (w = & gt; displayFormatIds.Contains (w.DisplayFormatId)); }
The query stalls are coming from a group of checkboxes that can have several options. The results that I am trying to return should not be narrowed down after the first set of criteria, but instead it should return more results.
Q: How can I use any object where the segment is returned instead of narrowing your returned items?
If I understand your question correctly, then you can gradually prepare your results, some like this (summarize Code for less) ...
IQueryable query = In context from X Choose Stuff X; & Lt; Content & gt; Output = list & lt; Content & gt; (); Output = query. Where (R = & gt; R. Titles). Contains ("SearchTerm")). ToList (); Output + = query.Where (r = & gt; r.Title). This includes ("different searchers")). ToList ();
How to execute in a clear group in Linq, however, in my humble opinion, given the complexity of your criteria, it would be quite accurate.
Comments
Post a Comment