示例#1
0
 void Apply(SavedNewDraftLessonEvent @event)
 {
     Id           = @event.Id;
     Title        = @event.Title;
     Discipline   = @event.Discipline;
     School       = @event.School;
     Classroom    = @event.Classroom;
     AuthorId     = @event.AuthorId;
     Content      = @event.Content;
     Conclusion   = @event.Conclusion;
     CreationDate = @event.CreationDate ?? DateTime.Now;
     FeedBacks    = @event.FeedBacks.ContainsKey(EntityStatus.A) ? @event.FeedBacks[EntityStatus.A].ToList() : new List <LessonFeedback>();
     Tags         = @event.Tags.ContainsKey(EntityStatus.A) ? @event.Tags[EntityStatus.A].ToList() : new List <LessonTag>();
     RecordState  = Constants.RECORD_STATE_ACTIVE;
     Published    = Constants.LESSON_NOT_PUBLISHED;
     Comments     = new List <LessonComment>();
     Ratings      = new List <LessonRating>();
 }
示例#2
0
 void Apply(SavedNewDraftLessonEvent @event)
 {
     Id = @event.Id;
     Title = @event.Title;
     Discipline = @event.Discipline;
     School = @event.School;
     Classroom = @event.Classroom;
     AuthorId = @event.AuthorId;
     Content = @event.Content;
     Conclusion = @event.Conclusion;
     CreationDate = @event.CreationDate ?? DateTime.Now;
     FeedBacks = @event.FeedBacks.ContainsKey(EntityStatus.A) ? @event.FeedBacks[EntityStatus.A].ToList() : new List<LessonFeedback>();
     Tags = @event.Tags.ContainsKey(EntityStatus.A) ? @event.Tags[EntityStatus.A].ToList() : new List<LessonTag>();
     RecordState = Constants.RECORD_STATE_ACTIVE;
     Published = Constants.LESSON_NOT_PUBLISHED;
     Comments = new List<LessonComment>();
     Ratings = new List<LessonRating>();
 }