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))))); }
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)))))); }