I have several records that all need to be updated to the same value. If I was just using ADO.NET I could just call a stored procedure that updated them all at one ...
UPDATE myTable
SET myColumn = "XXXXXX"
WHERE filterColumn == 'YYY'
But since I am using Entity Framework I am wondering if their was a similar way to update a set of records at once without having to loop through each of the values and set them individually? Currently I am using..
from s in myTables
where s.filterColumn == 'YYY'
select s;
var results = s.ToList();
foreach (i in results){
s.myColumn = "XXXXXX"
}
Is there a way to set the values all at once as in SQL?
I am using Entity Framework v6.1