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