@@ -50,7 +50,7 @@ public static class DBContext_Ext
|
||||
}
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(trialSiteSurvey.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(trialSiteSurvey.DomainEvents));
|
||||
}
|
||||
|
||||
|
||||
@@ -86,10 +86,8 @@ public static class DBContext_Ext
|
||||
subjectVisit.AddDomainEvent(new CheckStateChangedToAuditEvent() { SubjectVisitId = subjectVisit.Id });
|
||||
}
|
||||
|
||||
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(subjectVisit.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(subjectVisit.DomainEvents));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -117,7 +115,7 @@ public static class DBContext_Ext
|
||||
}
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(qCChallengeDialog.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(qCChallengeDialog.DomainEvents));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -143,7 +141,7 @@ public static class DBContext_Ext
|
||||
}
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(checkChallengeDialog.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(checkChallengeDialog.DomainEvents));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -180,7 +178,7 @@ public static class DBContext_Ext
|
||||
taskMedicalReview.AddDomainEvent(new UrgentMedicalReviewAddedEvent() { MedicalReviewId = taskMedicalReview.Id, VisitTaskId = taskMedicalReview.VisitTaskId });
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(taskMedicalReview.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(taskMedicalReview.DomainEvents));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,7 +219,7 @@ public static class DBContext_Ext
|
||||
}
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(readingMedicalReviewDialog.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(readingMedicalReviewDialog.DomainEvents));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -259,7 +257,7 @@ public static class DBContext_Ext
|
||||
visitTask.AddDomainEvent(new UrgentIRApplyedReReading() { VisitTaskId = visitTask.Id });
|
||||
|
||||
//添加进记录
|
||||
eventStoreList.AddRange(visitTask.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
|
||||
eventStoreList.AddRange(GetStoreEvents(visitTask.DomainEvents));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,6 +268,10 @@ public static class DBContext_Ext
|
||||
dbContext.EventStoreRecord.AddRange(eventStoreList);
|
||||
}
|
||||
|
||||
private static List<EventStoreRecord> GetStoreEvents(IReadOnlyCollection<DomainEvent> domainEvents)
|
||||
{
|
||||
return domainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }).ToList();
|
||||
}
|
||||
public class EnrollmentConfirmAndPD
|
||||
{
|
||||
public bool IsEnrollmentConfirm { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user