tags:

views:

48

answers:

1

hi, I have a table "Information" in my dataBase(SQL), it has 3 fields : ID , Date , Description
I want to show this data in a gridview between date1 and date2, but I want to show an empty record for date3 if date3 is between date1 and date2 but there is no data in my table that Date = date3, how can i do this with C# and Linq?

A: 

Here's an example in VB

Dim varListado As List(Of Information) = (From varNNN In varEntidades.Information Where varNNN.ID > 0 Select varNNN).ToList

If addNew = True Then
    Dim varNew As New Information
    varNew.ID = 0
    varNew.Description = "New Record Added"
    varNew.Date = Now
    varNew.Insert(0, varNew)
End If
Sebastián