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

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -