Linq to SQL: add a custom column and the Order By it? -


How can I do something similar from Linq in SQL (if possible, VB.NET)?

/ Sup>

I do not think the SQL Provider supports the addition of the Lambda column in the query. However, it supports a collateral operator, and since you are doing this essentially:

  SELECT * FROM commands from the order ISNULL (due date, DATEADD (year, 10, GETDATE ()))  

Try this:

Order order order from o Date date ?? If you need a fake, future date in your results for some reason, then you can modify the unit square in the LINQtoSQL designer.cs file. :

  [column (store = "_ payable", "DBTEP =" smallDetime "))] public system. Faucetable  date of payment {if (this ._DueDate == empty) {DateTime.Today.Add (10);} return it to ._DueDate;}  

So if you want to ask for a due date on the object and DueDate is zero, You will receive at least the future date.


Comments