Solved

Linq to sql , insert statements inside transcations

Posted on 2010-09-08
4
338 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

13 Experts available now in Live!

Get 1:1 Help Now