class AddressListItem
{
public string MKID { get; set; } //MKID always referce to .id field in response.
public string List { get; set; }
public string Address { get; set; }
public string CreationTime { get; set; }
public bool Disabled { get; set; }
public bool @Dynamic { get; set; }
public string Comment { get; set; }
public override string ToString()
{
string[] allProps = this.GetType()
.GetProperties()
.Select(prop =>
{
object? val = prop.GetValue(this);
string sVal = (null == val) ? "NULL" : val!.ToString()!;
return $"{prop.Name}={sVal}";
}).ToArray();
return string.Join(", ", allProps);
}
}
And when we trying to ExecuteReader():
var result = cmd.ExecuteReader<AddressListItem>();
var f = result.Where(r => r.Dynamic == false);
foreach (var ip in f)
{
Debug.WriteLine(ip.ToString());
}
we found that each row got only first "dynamic" property from mikrotik responce.
...
Result (Raw api response):
we create class:
And when we trying to ExecuteReader():
we found that each row got only first "dynamic" property from mikrotik responce.