예제 #1
0
 public static GremlinqSetup UseCosmosDb <TVertex, TEdge>(this GremlinqSetup setup, Expression <Func <TVertex, object> > partitionKeyExpression)
 {
     return(setup
            .UseCosmosDb()
            .UseModel(GraphModel
                      .FromBaseTypes <TVertex, TEdge>(lookup => lookup
                                                      .IncludeAssembliesOfBaseTypes())
                      .ConfigureProperties(model => model
                                           .ConfigureElement <TVertex>(conf => conf
                                                                       .IgnoreOnUpdate(partitionKeyExpression)))));
 }
예제 #2
0
 public static GremlinqSetup UseCosmosDb <TVertex, TEdge>(this GremlinqSetup setup, Expression <Func <TVertex, object> > partitionKeyExpression, Action <ProviderSetup <ICosmosDbConfigurator> >?extraSetupAction = null)
 {
     return(setup
            .UseCosmosDb(extraSetupAction)
            .ConfigureEnvironment(env => env
                                  .UseModel(GraphModel
                                            .FromBaseTypes <TVertex, TEdge>(lookup => lookup
                                                                            .IncludeAssembliesOfBaseTypes())
                                            .ConfigureProperties(model => model
                                                                 .ConfigureElement <TVertex>(conf => conf
                                                                                             .IgnoreOnUpdate(partitionKeyExpression))))));
 }