Пример #1
0
 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());
 }
Пример #2
0
        public async Task <IReadOnlyCollection <EntityResponse> > GetAllAsync()
        {
            var entities = await _entitiesRepository.GetAllAsync();

            return(_mapper.Map <IReadOnlyCollection <EntityResponse> >(entities));
        }