私は、Windows Azureのテーブル記憶から戻って読んで問題が生じています:ここで多くの問題
は、私は、テーブル・ストレージからUserEntityを取得するために使用したコードです:
以下TableServiceContext tableServiceContext = new TableServiceContext(storageAccount.TableEndpoint.AbsoluteUri, storageAccount.Credentials);
tableServiceContext.RetryPolicy = RetryPolicies.Retry(3, TimeSpan.FromSeconds(1));
user = (from g in tableServiceContext.CreateQuery<UserEntity>(PazoozaEnums.PazoozaTables.UsersUserFacebookActions.ToString())
where g.PartitionKey.Equals(FacebookUserID) && g.Kind.Equals(PazoozaEnums.TableKinds.User.ToString())
select g).AsTableServiceQuery().Execute().FirstOrDefault();
ですテーブルストレージに格納されているユーザーエンティティ実際には各プロパティの値があることに注意してください。しかし、返されるのは、代わりにNULLです。または、JoinDateフィールドでは1/1/0001、整数フィールドまたはLongフィールドでは0です。私はRowKeyとPartitionKeyをチェックし、これらはエンティティの一部として正しく返されますが、残りは正しくありません。パーティションキーとロウキーが正しく配置されているが、残りのフィールドは正しく配置されていない前に、誰かがアイデアを持っているか、この問題にぶつかりますか?私はnov 2011 azure sdk、c#mvc3を32ビットマシンで使用しています。ここで
AccessToken String AAADlql9ZBqlMBANM1J30d3cmnM6s1o5MojXyZBP5B3dXNkIweJRZA2fx73klxawRhUn9HZAqBC8Y22YZAtwlKolpep5b7ZCedYYSLmO79E5QZDZD
AlternativeName String
AlternativeProfileLink String
AlternativeSmallPicture String
AlternativeSmallPictureSquare String
EmailAddress String [email protected]
JoinDate DateTime 2012-03-16T04:35:01.518053Z
Kind String User
Name String PazoozaTest Pazman
OfflineAccessToken String AAADlql9ZBqlMBANM1J30d3cmnM6s1o5MojXyZBP5B3dXNkIweJRZA2fx73klxawRhUn9HZAqBC8Y22YZAtwlKolpep5b7ZCedYYSLmO79E5QZDZD
PageAccessToken String
PageID Int64 0
PageSize Int32 50
ProfileLink String http://www.facebook.com/profile.php?id=100001771566047
SmallPicture String http://profile.ak.fbcdn.net/hprofile-ak-snc4/41541_100001771566047_2716161_s.jpg
SmallPictureSquare String http://profile.ak.fbcdn.net/hprofile-ak-snc4/41541_100001771566047_2716161_q.jpg
VideoPageSize Int32 100
は私のUserEntityクラスです:
public class UserEntity : KindEntity, IUserEntity
{
// PartitionKey = UserID
// RowKey = (DateTime.MaxValue - DateTime.UtcNow).Ticks.ToString("d19") + Guid.NewGuid().ToString()
public UserEntity() : this(null, null) { }
public UserEntity(string partitionKey, string rowKey) : base(partitionKey, rowKey, PazoozaEnums.TableKinds.User.ToString()) { }
public string Name { get; set; }
public long PageID { get; set; }
public int PageSize { get; set; }
public int VideoPageSize { get; set; }
public string EmailAddress { get; set; }
public string AccessToken { get; set; }
public string PageAccessToken { get; set; }
public string OfflineAccessToken { get; set; }
public string SmallPicture { get; set; }
public string SmallPictureSquare { get; set; }
public string ProfileLink { get; set; }
public string AlternativeName { get; set; }
public string AlternativeSmallPicture { get; set; }
public string AlternativeSmallPictureSquare { get; set; }
public string AlternativeProfileLink { get; set; }
public DateTime JoinDate { get; set; }
}
ありがとうlucifure、問題は私が "ユーザー"以外の何かとして "種類"のプロパティを指定していた問題です。 –