Exemplo n.º 1
0
 /// <summary>
 /// Adds the host to set.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="set">The set.</param>
 public void AddHostToSet(Host host, HostSet set)
 {
     using (var session = this.store.OpenSession())
     {
         var dalSet = session.Get(set);
         dalSet.Hosts.Add(host);
         session.SaveChanges();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Removes the host from set.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="set">The set.</param>
 public void RemoveHostFromSet(Host host, HostSet set)
 {
     using (var session = this.store.OpenSession())
     {
         var dalSet = session.Get(set);
         dalSet.Hosts.Remove(host);
         session.SaveChanges();
     }
 }