public void AddPatient(string name, string surname, string batyaname, string sex, byte age) { _patient_repository.Add(new Patient { Name = name, Surname = surname, Batyaname = batyaname, Sex = sex, Age = age }); PatientAdded?.Invoke(); }
protected override void Consume([NotNull] PatientAddedEvent @event) { if (@event == null) { throw new ArgumentNullException(nameof(@event)); } PatientAdded?.Invoke(this, @event.PatientId); }
public void AddPatient(string name, Date birthday, bool alive, string externalId) { var newPatientId = Guid.NewGuid(); var newPatient = new Patient(name, birthday, alive, newPatientId, externalId); patients.Add(newPatientId, newPatient); PatientAdded?.Invoke(newPatient); connectionService.SendPatientAddedNotification(newPatient); }