Linq-to-sql - query is not filtered -


I'm really new to Linux and am using Linux-to-SQL. However, in the following example, where my section is never executed and as a result the query tries to get all the records from my table, also ignores the method.

Is anyone telling me what I am doing?

  var baseQry = db.Table; BaseQry.Where (a => a.tab_id == theId); BaseQry.Select (o = & gt; new {o.name, o.display_name, o.type, o.info, time_stamp = (convert.dataimestamp) .oolodet string ())}). Take (10); BaseQry.ToList ();  

your second line ...

  baseQry . Where (a => a.tab_id == theId);  

... is essentially a no-op, because the result is not in your query. Select the segment.

You need to change it:

  var baseQry = db.Table; Var result = baseline. Where (a => a.tab_id == theId). Select (o = & gt; new {o.name, o.display_name, o.type, o.info, time_stamp = (convert toDateTime (O.timestamp) toLongDateString ())}). Take (10) .ToList ();  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -