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(), '.'); } }
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; } }
public virtual void OnPersonUpdated() { CreateNotification(EventActionType.Updated); PersonUpdated?.Invoke(this, new NewNotificationEventArgs(this)); }