Linq to sql , insert statements inside transcations

I need to perform the following 2 tasks
1) insert into transactionheader
2) insert into transactiondetail

How can I do this using Linq to sql, and inside a transaction block. any suggestions or links to other urls wold be rgeatly appreciated. thanks a ton. I am using .net 4.0
TrialUserAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
roxviperConnect With a Mentor Commented:
Hi,

Please check out this link:

http://www.west-wind.com/weblog/posts/826145.aspx
0
 
Vipul PatelConnect With a Mentor .NET ExpertCommented:
Below url might be help you to resolve your problem

http://stackoverflow.com/questions/755796/how-to-create-a-linq-to-sql-transaction
0
 
Anil GolamariConnect With a Mentor Commented:
Dim q = From s In db.statements _
            Where s.ID = "some ID" _
            Select s

       Dim newStatement = New Statement With {.StatementID = "1", .CompanyName = "", .statement = "somedescription", .statementHeader = "header"}
    db.statements .Add(newStatement )
    db.SubmitChanges()

try something like this.
0
 
TrialUserAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.