Exemplo n.º 1
0
        public PractiseTopicStoreQuery(IPractiseTopic _PractiseTopic)
        {
            Field <PractiseTopicsPagedType>(
                name: "pratisetopics",
                description: "",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "Topic_id", Description = "Topic Id", DefaultValue = ""
            },
                    new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "Account_id", Description = "Account Id", DefaultValue = ""
            },
                    new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "key", Description = "key", DefaultValue = ""
            },
                    new QueryArgument <NonNullGraphType <IntGraphType> > {
                Name = "pageNumber", Description = "pageNumber", DefaultValue = 1
            },
                    new QueryArgument <NonNullGraphType <IntGraphType> > {
                Name = "pageSize", Description = "pageSize", DefaultValue = 20
            }
                    ),
                resolve: context => _PractiseTopic.GetByPaged(context.GetArgument <string>("Topic_id"), context.GetArgument <string>("Account_id"), context.GetArgument <string>("key"), context.GetArgument <int>("pageNumber"), context.GetArgument <int>("pageSize"))
                );

            Field <PractiseTopicsType>(
                name: "pratisetopic",
                description: "",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <StringGraphType> > {
                Name = "_id", Description = "PractiseTopic Id", DefaultValue = ""
            }
                    ),
                resolve: context => _PractiseTopic.GetById(context.GetArgument <string>("_id"))
                );
        }
Exemplo n.º 2
0
 public PractiseTopicsController(IPractiseTopic _PractiseTopic)
 {
     this._PractiseTopic = _PractiseTopic;
 }