public void AddItem(string text) { using (var session = Global.Store.OpenSession()) { var list = session.Query<ListOfItems>().FirstOrDefault(); var item = new ListItem() { Text = text }; list.Items.Add(item); session.SaveChanges(); BroadcastItem(item); } }
public void BroadcastItem(ListItem item) { Clients.All.broadcastItem(item); }