Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 无法转换为microsoft.azure.cosmosDB.table.itableentity_C#_.net_Azure_Azure Web App Service_Azure Storage - Fatal编程技术网

C# 无法转换为microsoft.azure.cosmosDB.table.itableentity

C# 无法转换为microsoft.azure.cosmosDB.table.itableentity,c#,.net,azure,azure-web-app-service,azure-storage,C#,.net,Azure,Azure Web App Service,Azure Storage,我正在尝试使用存储连接字符串将一些测试值插入Azure表。当我尝试执行插入操作时,它显示错误为无法将TableStorage.RunnerInputs转换为Microsoft.azure.cosmosDB.table.itableentity。 我正在做这件事,是关于 跑步班 namespace TableStorage { public class RunnerInputs:TableEntity { public RunnerInputs(string Param

我正在尝试使用存储连接字符串将一些测试值插入Azure表。当我尝试执行插入操作时,它显示错误为无法将TableStorage.RunnerInputs转换为Microsoft.azure.cosmosDB.table.itableentity。 我正在做这件事,是关于

跑步班

namespace TableStorage
{
 public  class RunnerInputs:TableEntity
    {
        public RunnerInputs(string ParameterName,string RowValue)
        {
            this.PartitionKey = ParameterName;
            this.RowKey = RowValue;
        }
        public string InputDate { get; set; }

    }
}
错误截图供参考。有人能告诉我我们如何克服这个问题吗?已经尝试通过铸造值,但结果是一样的

有人能告诉我我们如何克服这个问题吗

您的问题似乎是表实体包引用无法与表操作包引用匹配。Azure Comos DB和Azure表存储是不同的表。他们的软件包彼此不兼容。您可以对这些类使用相同的包引用来解决您的问题(如“Microsoft.WindowsAzure.Storage.Table”)。
结果如下:

有人能告诉我我们如何克服这个问题吗

您的问题似乎是表实体包引用无法与表操作包引用匹配。Azure Comos DB和Azure表存储是不同的表。他们的软件包彼此不兼容。您可以对这些类使用相同的包引用来解决您的问题(如“Microsoft.WindowsAzure.Storage.Table”)。
结果如下:

连接字符串作为键/值存储在app.config文件中。键是连接字符串的名称,例如“StorageConnectionString”。该值是Azure存储帐户(此链接:)中访问密钥的连接字符串。该连接字符串作为密钥/值存储在app.config文件中。键是连接字符串的名称,例如“StorageConnectionString”。该值是Azure存储帐户(此链接:)中访问密钥的连接字符串。
namespace TableStorage
{
 public  class RunnerInputs:TableEntity
    {
        public RunnerInputs(string ParameterName,string RowValue)
        {
            this.PartitionKey = ParameterName;
            this.RowKey = RowValue;
        }
        public string InputDate { get; set; }

    }
}