Linq to sql , insert statements inside transcations

Posted on 2010-09-08
Last Modified: 2013-11-11
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
Question by:TrialUser

Accepted Solution

roxviper earned 167 total points
ID: 33626362

Please check out this link:

Assisted Solution

by:Vipul Patel
Vipul Patel earned 167 total points
ID: 33626367
Below url might be help you to resolve your problem
LVL 18

Assisted Solution

by:Anil Golamari
Anil Golamari earned 166 total points
ID: 33627259
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 )

try something like this.

Author Closing Comment

ID: 33746209

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
send messages to whatsapp programatically 2 44
Web Form VB.Net  import CSV 4 36
C# guarantee sql connection close 6 39
Help with preventing downloading a zip file 10 35
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now