Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
SolvedPrivate

Linq Query

Posted on 2013-10-27
2
Medium Priority
?
55 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

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

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

604 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