Exemplo n.º 1
0
        public async Task <IActionResult> GetById(int userId)
        {
            var query  = new GetUserDetailsByIdQuery(userId);
            var result = await _queryExecutor.ExecuteAsync(query);

            return(_apiResponseHelper.SimpleQueryResponse(this, result));
        }
Exemplo n.º 2
0
        public Task <UserDetails> ExecuteAsync(GetCurrentUserDetailsQuery query, IExecutionContext executionContext)
        {
            if (!executionContext.UserContext.UserId.HasValue)
            {
                return(null);
            }

            var userQuery = new GetUserDetailsByIdQuery(executionContext.UserContext.UserId.Value);

            return(_queryExecutor.ExecuteAsync(userQuery, executionContext));
        }
        public IDomainRepositoryQueryContext <UserDetails> AsDetails()
        {
            var query = new GetUserDetailsByIdQuery(_userId);

            return(DomainRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Exemplo n.º 4
0
        public async Task <JsonResult> GetById(int userId)
        {
            var query = new GetUserDetailsByIdQuery(userId);

            return(await _apiResponseHelper.RunQueryAsync(query));
        }