How can I achieve the following:
RelationPredicateBucket predicate = new RelationPredicateBucket();
predicate.PredicateExpression.Add(PlayerSessionFields.PlayerSessionId == ssoDTO.PlayerSessionId);
PlayerSessionEntity sessionEntity = new PlayerSessionEntity();
//required bit ...
sessionEntity.GameCount++;
//end required bit...
using (DataAccessAdapter adapter = new DataAccessAdapter())
{
int numUpdated = adapter.UpdateEntitiesDirectly(sessionEntity, predicate);
}
So the SQL i would want is:
update playersession set gamecount=gamecount+@amount where ...
I do not want to load the entity and do
update playersession set gamecount=@gamecount
because of concurrency etc.
thanks