private void Apply(PersonUpdated ev)
        {
            var data = ev.Data as PersonData;

            if (_ctx_model.Players.Exists(p => p.Id.Equals(data.Person.Id)))
            {
                _ctx_model.Players.First(p => p.Id.Equals(data.Person.Id)).Name =
                    string.Concat(data.Person.First_name, ' ', data.Person.Last_name.First(), '.');
            }
        }
Example #2
0
        private void Apply(PersonUpdated ev)
        {
            var data    = ev.Data as PersonData;
            var players = _ctx_model.All_players().Where(x => x.Id == data.Person.Id);

            foreach (var player in players)
            {
                player.First_name = data.Person.First_name;
                player.Last_name  = data.Person.Last_name;
            }
        }
Example #3
0
 public virtual void OnPersonUpdated()
 {
     CreateNotification(EventActionType.Updated);
     PersonUpdated?.Invoke(this, new NewNotificationEventArgs(this));
 }