Hi All,
how to exchange two column data in Entityframework ?
Like we have update query in sql
UPDATE dbo.Employee
SET custom1=custom2 , custom2=custom1
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
ali tuncerRank #1,499 · 1.1K reputationPosted Apr 26, 2016, 11:43 PM EDT
I think you will need a variable to hold value..
s.Name = s.LastName
s.LastName = temp;
context.SaveChanges();
Munesh SharmaRank #174 · 13.9K reputationPosted May 1, 2016, 7:29 AM EDT