我很难理解我的问题在这里是什么. CS0452 error, The type T must be ref type in order to use as a parameter...个
错误在此行上:
Response<T> tableEntity = TC.GetEntity<T>(pk, rk);
个
using Azure;
using Azure.Data.Tables;
namespace AzureDataTables
{
public class AzureDataTables<T> : IAzureDataTables<T> where T : class, ITableEntity, new()
{
ITableEntity GetTableEntity(string pk, string rk);
}
public class AzureDataTables<T> : IAzureDataTables<T> where T : ITableEntity, new()
{
public T GetTableEntity(string pk, string rk)
{
var tableEntity = TC.GetEntity<T>(pk, rk);
return tableEntity.Value;
}
public TableServiceClient TSC { get; set; } = new TableServiceClient("");
public TableClient TC => TSC.GetTableClient("");
}
}