internal IQueryable<DataField> GetDirtyDataFields(string updateId, DateTime updateTimeStamp)Is there a way to combine the foreach statement into my LINQ statement such that I do an update and return the list in one pass?
{
var dirtyData = (from DataField df in this.DataFields where df.IsDirty && !df.IsNotApplicable select df);
foreach (DataField df in dirtyData)
{
df.UpdatorId = updateId;
df.UpdateDate = updateTimeStamp;
}
return dirtyData;
}
Copyright (c) Marimer LLC