public void Handle(CommentAdded domainEvent) { var presentation = _repository.Get <Session>(domainEvent.PresentationId); _mailGateway .GetMailerWith("Session comment added", GetEmailBody(domainEvent, domainEvent.PresentationId)) .AddRecipients(_repository.Find <UserProfile>().AdminEmails()) .AddRecipients(_repository.Get <UserProfile>(presentation.UserId).Email) .Send(); }
public void ConfigureDlg() { undeliveryView.ConfigureDlg(UoW, UndeliveredOrder); undeliveryView.isSaved += () => Save(false); SetAccessibilities(); if (UndeliveredOrder.Id > 0) //если недовоз новый, то не можем оставлять комментарии { IUnitOfWork UoWForComments = UnitOfWorkFactory.CreateWithoutRoot(); unOrderCmntView.Configure(UoWForComments, UndeliveredOrder, CommentedFields.Reason); unOrderCmntView.CommentAdded += (sender, e) => CommentAdded?.Invoke(sender, e); this.Destroyed += (sender, e) => { UoWForComments?.Dispose(); }; } }