public ProjectPlanMutation(IProjectPlanLogic projectPlanLogic)
 {
     FieldAsync <BooleanGraphType>(
         "addProjectPlan",
         arguments: new QueryArguments(new QueryArgument <ProjectPlanInputType>
     {
         Name = "plan"
     }),
         resolve: async context => { return(await projectPlanLogic.Insert(context.GetArgument <ProjectPlan>("plan"))); }
         );
     FieldAsync <BooleanGraphType>(
         "editProjectPlan",
         arguments: new QueryArguments(new QueryArgument <ProjectPlanInputType>
     {
         Name = "plan"
     }),
         resolve: async context => { return(await projectPlanLogic.Update(context.GetArgument <ProjectPlan>("plan"))); }
         );
     FieldAsync <BooleanGraphType>(
         "deleteProjectPlan",
         arguments: new QueryArguments(new QueryArgument <ProjectPlanInputType>
     {
         Name = "plan"
     }),
         resolve: async context => { return(await projectPlanLogic.Delete(context.GetArgument <ProjectPlan>("plan"))); }
         );
 }
Example #2
0
 public ProjectPlanQuery(IProjectPlanLogic projectPlanLogic)
 {
     FieldAsync <ProjectPlanType>(
         "planByDocument",
         arguments: new QueryArguments(new QueryArgument <IntGraphType>
     {
         Name = "documentId"
     }),
         resolve: async context => { return(await projectPlanLogic.GetById(context.GetArgument <int>("documentId"))); }
         );
     FieldAsync <ProjectPlanType2>(
         "planByProject",
         arguments: new QueryArguments(new QueryArgument <LongGraphType>
     {
         Name = "projectID"
     }),
         resolve: async context => { var plans = await projectPlanLogic.GetByProject(context.GetArgument <long>("projectID"));
                                     return(plans); }
         );
 }
 public ProjectPlanController(IProjectPlanLogic logic, IMapper mapper)
 {
     _logic  = logic;
     _mapper = mapper;
 }
 public ProjectPlanType2(IPhaseLogic phaseLogic, IStudentLogic studentLogic, IProjectLogic projectLogic, IProjectPlanLogic projectPlanLogic)
 {
     Field(x => x.ProjectID);
     //Field(x => x.DocumentID);
     //Field(x => x.Title);
     //Field(x => x.Note);
     //Field(x => x.EstimatedStartDate);
     //Field(x => x.Duration);
     //Field(x => x.DateOfCompilation);
     FieldAsync <ProjectPlanType>("projectPlan", resolve: async context => { return(await projectPlanLogic.GetByProject(context.Source.ProjectID)); });
     FieldAsync <ProjectType>("project", resolve: async context => { return(await projectLogic.GetById(context.Source.ProjectID)); });
     //Field<EmployeeType>("employee", resolve: context => { return employeeLogic.GetByID(context.Source.ComposedBy.EmployeeID); }); //IZMENI, nema objekat composed by
     FieldAsync <ListGraphType <PhaseType> >("phases", resolve: async context => { return(await phaseLogic.GetByProjectPlan(context.Source.DocumentID)); });
     FieldAsync <ListGraphType <StudentType> >("students", resolve: async context => { return(await studentLogic.GetAcceptedByProject(context.Source.ProjectID)); });
 }
Example #5
0
 //private readonly IMapper _mapper;
 public ProjectPlanController(IProjectPlanLogic logic)
 {
     _logic = logic;
     //_mapper = mapper;
 }