Exemple #1
0
 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);
     }
 }
Exemple #2
0
 public void BroadcastItem(ListItem item)
 {
     Clients.All.broadcastItem(item);
 }