Im trying to insert a new record though linq. im able to update and read data with out any problem.but i just cant figure out how to just inset a new record. here is a start of my function. i know its not done yeat. all help would be nice.
Public Function AddAddressInfo(ByVal objdeptGUID As String, ByVal objGEOCode As String, ByVal objArressCommonName As String, ByVal objStreetAddress As String, ByVal objAddressNotes As String, ByVal objIsPublic As Boolean, ByVal objSesionToken As String)
''#Check of Token is good
If CheckToken(objSesionToken, objdeptGUID) = False Then
Return "Error"
End If
Try
Dim lqAlarms As New linqAlarmDumpDataContext
Dim AddInfo = From r In lqAlarms.tbAddressInfos
Where r.DeptGUID = objdeptGUID
Select r
Catch ex As Exception
End Try
End Function
Use the
InsertOnSubmit()andSubmitChanges()to insert your records.