Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

I think aqueduct need provide object transfer method like the AutoMapper #951

Open
SinoMiles opened this issue Feb 18, 2021 · 0 comments
Open

Comments

@SinoMiles
Copy link

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;

@SinoMiles SinoMiles changed the title I think aqueduct need provide object transfer method like AutoMapper I think aqueduct need provide object transfer method like the AutoMapper Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant