Solved

Linq to sql , insert statements inside transcations

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

10 Experts available now in Live!

Get 1:1 Help Now