SolvedPrivate

Linq Query

Posted on 2013-10-27
2
40 Views
Last Modified: 2016-02-10
Hi Experts

I have tables with  all tables  having column status.  I need help in writing
a linq query to update the rows of this  column to status ='reject' on all tables.

i have around 10 tables
i can write an update query on seperate tables  independently . but  is there a better way.

Please advice.
0
Comment
Question by:B_Pati
2 Comments
 
LVL 15

Accepted Solution

by:
Ess Kay earned 500 total points
ID: 39604750
You can create a stored procedure,  and run it once
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 39605943
Hi B_Pati;

You will have better performance if you do it the way @esskayb2d has suggested. The reason being is that you will have to download all the records from all the 10 tables and then iterate through the collections to modify the column status then save you changes back to the database.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

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…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

895 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

16 Experts available now in Live!

Get 1:1 Help Now