private static void CreatePushNotificationTable(CloudTableClient cloudTableClient) { cloudTableClient.CreateTableIfNotExist(UserTablesServiceContext.PushUserTableName); // Execute conditionally for development storage only. if (cloudTableClient.BaseUri.IsLoopback) { var context = cloudTableClient.GetDataServiceContext(); var entity = new PushUserEndpoint { UserId = "UserName", ChannelUri = "http://tempuri", TileCount = 0 }; context.AddObject(UserTablesServiceContext.PushUserTableName, entity); context.SaveChangesWithRetries(); context.DeleteObject(entity); context.SaveChangesWithRetries(); } }
public void UpdatePushUserEndpoint(PushUserEndpoint pushUserEndpoint) { this.UpdateObject(pushUserEndpoint); this.SaveChanges(); }