コード例 #1
0
 public async Task <Response <TEntity> > GetByIdAsync(int id) =>
 (await ObjectToDbMapperFactory <TEntity> .Create()).GetPk()
 .Success(async x =>
          Response <TEntity> .From((await CreateMapper()).Map(await SqlAccessService.SelectData(new Parameters()
                                                                                                .Add(x, id)
                                                                                                .Send(),
                                                                                                (await EntityToColumns <TEntity> .MapAsync()).Send()))))
 .Error(x => Response <TEntity> .Error());
コード例 #2
0
 public async Task <Response <List <TEntity> > > GetAsync(List <Parameter> parameters) =>
 ReturnResult((await CreateMapper()).MapList((await SqlAccessService.SelectData(parameters, (await EntityToColumns <TEntity> .MapAsync())
                                                                                .Send()))));