c# - Adding a calculated field in LINQ select results? -


I have a LINQ query (with EF)

Actually I want to add a column to the selection I want results based on the value of the second column.

I have a paydaydate column in the DB table but there is no paid column. If there is a zero in the PaymentDate column, it also shows that the payment is wrong and if there is some date, then payment means that it is true.

Here is my query, please guide me how to do it.

  from InvoiceSet to groom join BookedAreasSet BookedAreas in selectedResults = invoice equals join InvoiceSet.InvoiceID BookedAreasSet.InvoiceID Kshetraset the area Bukedarsset. Area of ​​area is equal to area. Select the new invoices. Invoice number, invoiceet Amount, invoice total discount, invoiceet. GST, invoice Paymentset, Invoice Set. Shopping Centre, Bucharest, Arcadia Buked Ariad, Ariaset Knam, here I want to calculate the value InvoiceSet.PaymentDate value based on column} add    

text after

I think you should be able in this way to some the

  from InvoiceSet bridesmaid selectedResults = invoice on InvoiceSet.InvoiceID on BookedAreas BookedAreasSet.InvoiceID BookedAreasSet.AreaID areas to be included in BookedAreasSet equal join AreaSet new selection AreaSet.AreaID equal {InvoiceSet. Invoice number, invoiceset Amount, Invoisset, membership discounts, Invoissetkjisti, Inv oiceSet.PaymentDate, InvoiceSet.ShoppingCentreID, BookedAreasSet.BookedAreaID, AreaSet.Name, pay = (InvoiceSet.PaymentDate == NULL)}    

Comments