我正在尝试从 azure 存储表中获取所有行,但是当我显示它们时,除 PartitionKey 和 RowKey 之外的所有值都是 null 或 0。我是否遗漏了什么或者我做错了什么导致所有值都无法读取适当地?
这是我用来获取所有数据的代码。
List<Employe> employeList = new List<Employe>();
TableQuery<Employe> query = new TableQuery<Employe>();
employeList = table.ExecuteQuery(query).ToList();
这是模型。
class Employe:TableEntity
{
public string prenume { get; set; }
public string functie { get; set; }
public int salar_baza { get; set; }
public int retineri { get; set; }
public int spor { get; set; }
public int total_brut { get; set; }
public int brut_impozabil { get; set; }
public int impozit { get; set; }
public int cas { get; set; }
public int cass { get; set; }
public int virat_card { get; set; }
public int premii_brute { get; set; }
public Employe()
{
}
public Employe(string nr_crt, string name,string prename,string function, int salarBaza,int retinere,int sporuri,int premiu_burt)
{
PartitionKey = nr_crt;
RowKey = name;
this.prenume = prename;
this.functie = function;
this.salar_baza = salarBaza;
this.retineri = retinere;
this.spor = sporuri;
this.premii_brute = premiu_burt;
this.total_brut = salarBaza+(salarBaza*(sporuri/100))+premiu_burt;
this.cas = (25/100)*total_brut;
this.cass = (10/100)*total_brut;
this.brut_impozabil = total_brut-cas-cass;
this.impozit = (10/100)*brut_impozabil;
this.virat_card =total_brut-impozit-cas-cass-retinere;
}
}