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());
public async Task <Response <List <TEntity> > > GetAsync(List <Parameter> parameters) => ReturnResult((await CreateMapper()).MapList((await SqlAccessService.SelectData(parameters, (await EntityToColumns <TEntity> .MapAsync()) .Send()))));