Example #1
0
 public void AddToken(Node node)
 {
     using (var ctx = new ShardClusterDBContext(masterConnectionString))
     {
         ctx.Tokens.AddRange(node.Tokens);
         ctx.SaveChanges();
     }
 }
Example #2
0
 public void AddNode(Node node)
 {
     using (var ctx = new ShardClusterDBContext(masterConnectionString))
     {
         ctx.Nodes.Add(node);
         ctx.SaveChanges();
     }
 }
Example #3
0
 public void AddToken(Node node)
 {
     using (var ctx = new ShardClusterDBContext(masterConnectionString))
     {
         ctx.Tokens.AddRange(node.Tokens);
         ctx.SaveChanges();
     }
 }
Example #4
0
 public void AddNode(Node node)
 {
     using (var ctx = new ShardClusterDBContext(masterConnectionString))
     {
         ctx.Nodes.Add(node);
         ctx.SaveChanges();
     }
 }
Example #5
0
 public void RemoveNode(Node node)
 {
     using (var ctx = new ShardClusterDBContext(masterConnectionString))
     {
         ctx.Nodes.Attach(node);
         ctx.Nodes.Remove(node);
         ctx.SaveChanges();
     }
 }
Example #6
0
 public void RemoveNode(Node node)
 {
     using (var ctx = new ShardClusterDBContext(masterConnectionString))
     {
         ctx.Nodes.Attach(node);
         ctx.Nodes.Remove(node);
         ctx.SaveChanges();
     }
 }