Solved

Linq to sql , insert statements inside transcations

Posted on 2010-09-08
4
340 Views
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
0
Comment
Question by:TrialUser
4 Comments
 
LVL 5

Accepted Solution

by:
roxviper earned 167 total points
ID: 33626362
Hi,

Please check out this link:

http://www.west-wind.com/weblog/posts/826145.aspx
0
 
LVL 5

Assisted Solution

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

http://stackoverflow.com/questions/755796/how-to-create-a-linq-to-sql-transaction
0
 
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 )
    db.SubmitChanges()

try something like this.
0
 

Author Closing Comment

by:TrialUser
ID: 33746209
thanks
0

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 vb.net 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