I think aqueduct need provide object transfer method like the AutoMapper
SinoMiles opened this issue · 0 comments
SinoMiles commented
Fetching Only Some Columns/Properties
var query = new Query(context)
..resultingProperties((e) => [e.id, e.name]);
var employees = await query.fetch();
If I just need some Columns. I can definition Class like the following
Class EmployeeOutPutDto{
String name;
int age;
}
var query = new Query<Employee>(context)
var employees = await query.fetch().tolist();
var result=Mapper<List<EmployeeOutPutDto>>(employees );
return result;