Пример #1
0
        public UsersSearchResponse SearchUser(ISession session, UsersSearchRequest request)
        {
            var response = request.CreateResponse<UsersSearchResponse>();

            using (var uow = UnitOfWorkFactory.Create())
            {
                var users = uow.UsersRepository.AllMatching(UserSpecification.NameLike(request.QueryString), 20);
                var userDtos = users.ProjectedAsCollection<UserDto>();
                
                response.Result = userDtos.ToArray();
            }
            return response;
        }
		public Task<UsersSearchResponse> SearchUser(UsersSearchRequest request)
		{
			return ConnectionManager.SendRequestAndWaitResponse<UsersSearchResponse>(request);
		}