public MatterType(ALBData data) { Name = "Matter"; Description = "A legal thingy"; Field <NonNullGraphType <StringGraphType> >("reference", "The reference of the matter."); Field <StringGraphType>("description", "The description of the matter."); Field <DebtType>("debt", "The debt information", resolve: context => data.GetDebtForMatter(context.Source as Matter)); IsTypeOf = value => value is Matter; }
public ALBData MapALBData(ALBGlobal albGlobal) { var data = new ALBData(); if (albGlobal.Learners != null) { data.Globals = MapGlobals(albGlobal).ToList(); data.Learners = MapLearners(albGlobal).ToList(); data.LearnerPeriodisedValues = MapLearnerPeriodisedValues(albGlobal).ToList(); data.LearnerPeriods = MapLearnerPeriods(albGlobal).ToList(); data.LearningDeliveries = MapLearningDeliveries(albGlobal).ToList(); data.LearningDeliveryPeriodisedValues = MapLearningDeliveryPeriodisedValues(albGlobal).ToList(); data.LearningDeliveryPeriods = MapLearningDeliveryPeriods(albGlobal).ToList(); } return(data); }
public ClientType(ALBData data) { Name = "Client"; Description = "A client - person or organisation"; Field <NonNullGraphType <StringGraphType> >("reference", "The reference of the client."); Field <StringGraphType>("name", "The name of the client."); var arguments = new QueryArguments( new[] { new QueryArgument <NonNullGraphType <StringGraphType> > { Name = "reference", Description = "reference of the matter" } }); Field <ListGraphType <MatterType> >("matters", "The matters for the client", arguments, resolve: context => data.GetMattersForClient(context.Source as Client, (string)context.Arguments["reference"])); IsTypeOf = value => value is Client; }
public Task StoreALBDataAsync(ALBData albData, SqlConnection sqlConnection, CancellationToken cancellationToken) => _albDataStoreService.StoreAsync(albData, sqlConnection, cancellationToken);