コード例 #1
0
        public QueryResultResource <PlanningAppSummaryResource> GetPlanningApps(PlanningAppQueryResource filterResource)
        {
            var filter = mapper.Map <PlanningAppQueryResource, PlanningAppQuery>(filterResource);

            var queryResult = repository.GetPlanningApps(filter);

            return(mapper.Map <QueryResult <PlanningApp>, QueryResultResource <PlanningAppSummaryResource> >(queryResult));
        }
コード例 #2
0
        public QueryResultResource <PlanningAppSummaryResource> GetPlanningApps(PlanningAppQueryResource filterResource)
        {
            var filter = mapper.Map <PlanningAppQueryResource, PlanningAppQuery>(filterResource);

            var queryResult = new QueryResult <PlanningApp>();

            if (filterResource.SearchCriteria == true)
            {
                queryResult = repository.GetPlanningAppsSearchCriteria(filter);
            }
            else
            {
                queryResult = repository.GetPlanningApps(filter);
            }

            return(mapper.Map <QueryResult <PlanningApp>, QueryResultResource <PlanningAppSummaryResource> >(queryResult));
        }