public async Task <QueryResultResource <StateInitialiserResource> > GetPlanningApps(StateInitialiserQueryResource filterResource)
        {
            var filter = mapper.Map <StateInitialiserQueryResource, StateInitialiserQuery>(filterResource);

            var queryResult = await stateRepository.GetStateInitialisers(filter);

            return(mapper.Map <QueryResult <StateInitialiser>, QueryResultResource <StateInitialiserResource> >(queryResult));
        }
Example #2
0
        public async Task <IActionResult> GetGenerators([FromQuery] bool includeDeleted)
        {
            var stateInitialisers = await stateRepository.GetStateInitialisers(new StateInitialiserQuery());

            var result = mapper.Map <QueryResult <StateInitialiser>, QueryResult <StateInitialiserResource> >(stateInitialisers);

            return(Ok(result));
        }