private void ProcessWebHook(WebhooksEvents WebhooksEvent) { try { MyWorkbench.BusinessObjects.Helpers.EmailHelper.UpdateReceivedEvent(this.DataSourceHelper.Session, WebhooksEvent.InternalMessageId, WebhooksEvent.Email, WebhooksEvent.EventType.ToString()); } catch (Exception ex) { throw ex; } }
public static void AddReceivedEvent(Session Session, string InternalMessageId, string EmailAddress, string EventType) { using (UnitOfWork unitOfWork = new UnitOfWork(Session.DataLayer)) { WebhooksEvents webhooksEvents = new WebhooksEvents(unitOfWork) { Email = EmailAddress, InternalMessageId = InternalMessageId, EventType = EventType }; unitOfWork.CommitChanges(); } }