コード例 #1
0
ファイル: WebRole.cs プロジェクト: Setuber/Ringify
        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();
            }
        }
コード例 #2
0
        public void UpdatePushUserEndpoint(PushUserEndpoint pushUserEndpoint)
        {
            this.UpdateObject(pushUserEndpoint);

            this.SaveChanges();
        }