Dear .NET DataStore users,
we have a Web API based on the .NET Datastore that - especially in one case - uses heavily structured objects derived from DataObjects with nested objects which then get added as Properties in the Model annotated as DwReport. Example:
public class ItemModel
{
[Key]
[DwColumn("items", "art")]
public int itemId { get; set; }
[DwReport(typeof(ItemClientModel), ParamValues = "itemId")]
public IList<ItemClientModel> clients { get; set; }
}
We use GetModel(<TModel>, true) on each and every base object ("row") to force retrieval of the nesteds objects. This leads to sub-elements (in this case the IList clients) to be retrieved and filled.
My question:
Is it possible to force Async retrieval for retrieving nested data?
Is there a better way to do this than described above?
We have thought about reading nesteds not for every row but for all rows in a single go and distributing data to the ILists programmatically. We then would only have one SELECT issued for one nested and not n (for n being the number of main rows in the result).
Any help appreciated.
Roland