public static void Add <T, TProperty>(
     this MutationObjectGraphType mutation,
     InputBuilderFactory inputBuilderFactory,
     IConfiguration configuration,
     Expression <Func <T, TProperty> > expression) where T : class, IIdEntity, new()
 {
     inputBuilderFactory.Create <T>(mutation)
     .ConfigureTableStorage <T>()
     .AddConnectionString(configuration["Storage:ConnectionString"])
     .AddPartition(expression)
     .BuildTableStorage()
     .Delete <IdInput, Status>(m => new T {
         Id = m.Id
     }, t => new Status())
     .DeleteAll(() => new Status {
         Message = "All entities removed."
     })
     .Build();
 }
Exemple #2
0
 public SchemaConfig(IServiceProvider resolver, QueryConfigObjectGraphType query, MutationObjectGraphType mutation) : base(resolver)
 {
     Query    = query;
     Mutation = mutation;
 }