public async Task <ICollection> ListAllAsync() { return((await usersRepository.GetAllAsync().ConfigureAwait(false)) .Select(user => new { user.Id, user.Login, user.FirstName, user.LastName, user.Email }).ToList()); }
public async Task <IReadOnlyCollection <EntityResponse> > GetAllAsync() { var entities = await _entitiesRepository.GetAllAsync(); return(_mapper.Map <IReadOnlyCollection <EntityResponse> >(entities)); }