protected void UpdateAction(ResourceType resourceType, ResourceContainer resourceContainer, object entity) { AstoriaTestLog.WriteLine("Updating entity set :{0} , entity type :{1}", resourceContainer.Name, resourceType.Name); //Change any of the properties that make up the Etag #if !ClientSKUFramework IEdmEntityType entityType = DataServiceMetadata.GetEntityType(entity); foreach (string eTagProperty in entityType.EtagProperties()) { Type propertyType = entity.GetType().GetProperty(eTagProperty).PropertyType; object newValue = propertyType.GetTypedValue(eTagProperty, resourceType.Properties[eTagProperty].Facets.MaxSize); //entity.SetPropertyValue(eTagProperty, newValue); } #endif CurrentContext.UpdateObject(entity); ExecuteAndValidate(() => { CurrentContext.SaveChanges(SaveChangeOption); }); }