我有一个具有以下架构的天蓝色表:
public class Village : TableServiceEntity
{
public Village(string districtName, string villageName)
{
PartitionKey = districtName.ToLower().Trim();
RowKey = villageName.ToLower().Trim();
DistrictName = districtName;
VillageName = villageName;
}
public string DistrictName {get;set;}
public string VillageName {get;set;}
}
区名和村名分别是分区键和行键。我希望此密钥不区分大小写。也就是说,如果用户给出以下值,那么两者都应该代表同一个实体:
那是
区名 = "TVM"; VillageName = "陈";
和
DistrictName = "电视"; VillageName = "陈";
上述两个值代表同一个实体。我需要以不区分大小写的方式存储分区和行键。这是正确的方法吗?