Пример #1
0
 public void Handle(TableCreated e)
 {
     _tables.Save(new TableView()
     {
         Id         = e.Id,
         Name       = e.Name,
         BuyIn      = e.BuyIn,
         SmallBlind = e.SmallBlind,
         MaxPlayers = e.MaxPlayers
     });
 }
Пример #2
0
        private void CreateUser(UserCreated e)
        {
            var user = new UserView
            {
                Id           = e.Id,
                UserName     = e.UserName,
                FacebookId   = e.FacebookId,
                Email        = e.Email.ToLowerInvariant(),
                PasswordHash = e.PasswordHash,
                PasswordSalt = e.PasswordSalt,
                CreationDate = e.CreationDate,
                Cash         = e.Cash
            };

            _users.Save(user);
        }
 public void Handle(SiteCreated e)
 {
     _sites.Save(e.Id, site => { });
 }
Пример #4
0
 public bool Save(string key, object obj)
 {
     return(_collection.Save(key, obj));
 }