User-908392717 posted
I can get LINQ to insert with no problem, I would like for it to Insert only if its a new record .. I'm trying to figure out the way to do this .. do I use IF Statements or is there an easier way .. this is the code I'm using for Insert
Protected
Sub Insert_Click(ByVal sender
As
Object,
ByVal e
As System.EventArgs)
Handles Insert.Click
Dim db
As
New DataClassesDataContext
Dim w
As
New UserStatus
With {.Value =
"Week 1", .UserID = User.Identity.Name}
db.UserStatus.InsertOnSubmit(w)
db.SubmitChanges()
ShowData()
End
Sub
Thanks for Any Help