Ejemplo n.º 1
0
        /// <summary>
        /// Returns the justification objectives for the office with the given id.
        /// </summary>
        /// <param name="officeId">The office by id.</param>
        /// <param name="queryOperator">The query operator.</param>
        /// <returns>The justification objectives.</returns>
        public async Task <PagedQueryResults <JustificationObjectiveDTO> > GetJustificationObjectivesByOfficeIdAsync(int officeId, QueryableOperator <JustificationObjectiveDTO> queryOperator)
        {
            var results = await JustificationObjectiveQueries.CreateGetJustificationObjectiveDTByOfficeIdOQuery(this.Context, officeId, queryOperator).ToPagedQueryResultsAsync(queryOperator.Start, queryOperator.Limit);

            logger.Trace("Retrieved justification objectives for office with id [{0}].", officeId);
            return(results);
        }
Ejemplo n.º 2
0
 private IQueryable <int> CreateGetAllowedObjectiveIdsQuery(int officeId)
 {
     return(JustificationObjectiveQueries.CreateGetJustificationObjectiveDTByOfficeIdOQuery(this.Context, officeId).Select(x => x.Id));
 }