public async Task <IEnumerable <UserDto> > GetAllUsers() { var users = await _repository.GetAllUsers(); var usersDto = _mapper.Map <IEnumerable <UserDto> >(users); return(usersDto); }
public async Task <IEnumerable <DatamartDto> > GetAllDatamarts() { var allDatamarts = await _repository.GetAll(); var datamartDtos = _mapper.Map <IEnumerable <DatamartDto> >(allDatamarts); return(datamartDtos); }
public async Task <IEnumerable <SavedIdsDto> > GetSavedIdsBySavedFilterId(int savedFilterId) { var mySavedIds = await _repository.GetSavedIdsBySavedFilterId(savedFilterId); var mySavedIdsDto = _mapper.Map <IEnumerable <SavedIdsDto> >(mySavedIds); return(mySavedIdsDto); }
public async Task <IEnumerable <ListInProgressItemDto> > GetListInProgress(int userId) { var listInProgress = await _repository.GetListInProgress(userId); var listInProgressDto = _mapper.Map <IEnumerable <ListInProgressItemDto> >(listInProgress); return(listInProgressDto); }
public static TTo[] MapToArray <TFrom, TTo>(this IMapperResolver <TTo> mapper, IEnumerable <TFrom> items, params object[] options) { var opt = new MappingOptions(options); return(mapper.Map(items, opt).ToArray()); }
public static TTo Map <TFrom, TTo>(this IMapperResolver <TTo> mapper, TFrom item, params object[] options) { var opt = new MappingOptions(options); return(mapper.Map(item, opt, opt.Get <TTo>())); }
public async Task <IEnumerable <FilterDto> > GetFilters() { var filters = await _repository.GetAll(); var filtersDto = _mapper.Map <IEnumerable <FilterDto> >(filters); return(filtersDto); }
public async Task AddSavedFilter(SavedFilterDto savedFilterDto) { var savedFilter = _mapper.Map <SavedFilter>(savedFilterDto); await _repository.AddSavedFilter(savedFilter); }