I'm using linq to oracle with the dotconnect for oracle and i'm inserting some data in a oracle table. I want to get the id that the table gives with a trigger to that column, so I have searched in the internet and got a code for linq to sql that I have tried but it always gives me a 0 as the new id of the row that I have just inserted when the table it's not empty, so clearly it doesn't get the data from the database.
The code that I am using is:
'here I make the variable that i'm going to insert in the table TObject
Dim inserto As New Csicontext.TObject
'I create de linq variable
dim oraclelinq as New Csicontext.Csidatacontext
'I give the variable some data to insert
With inserto
.IdAplicacion = idaplicacion
.Descripcion = descripcion
.Activo = "a"
End With
'I insert the data in the table
oraclelinq.TObjetos.InsertOnSubmit(inserto)
oraclelinq.SubmitChanges()
'And in this step I am supposed to get the id from the table of oracle, but only gives a '0'
Return inserto.IdObject
I am doing anything wrong or in linq to oracle that it's still not suported?