How to modify the list which is obtained by linq
how to modify the value of column in linq?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Sep 9, 2014, 4:58 AM EDT
Is it possible to share your code?
Abhishek
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.
Lawrence Pond149 reputationPosted Sep 16, 2014, 9:11 PM EDT
var cust = (from c in customers
where c.CustomerID == "ALFKI"
select c).FirstOrDefault();
cust.City = "Achalpur";
// this would change the city
Then you would have to save the back to table.