I am using the manager classes (modified slightly by me) and have the following code
ISortExpression sorterActuals = new SortExpression(SortClauseFactory.Create(CubeDealItemUserFieldIndex.CubeDate, SortOperator.Ascending));
EntityCollection myActuals = CubeDealItemUserManager.MGRGetLoadedActuals(null,sorterActuals);
foreach(CubeDealItemUserEntity myActual in myActuals)
{
myActual.CubeDate.AddMonths(monthsToAdd);
myActual.CubeMonth.AddMonths(monthsToAdd);
}
CubeDealItemUserManager.SaveCollection(myActuals);
This code does not update all records in the collection as expected....However if I step through each entity updating individually then that is inefficient with respect to hits to the database.
What am I doing wrong?
What is the quickest and most efficient way to update 1 or more fields in my entity collection?
Many thanks in advance