Пример #1
0
 //constructor with IMemento parameter for EventStore Snapshooting
 private Lesson(LessonMemento mementoItem)
 {
     Id            = mementoItem.Id;
     Title         = mementoItem.Title;
     Discipline    = mementoItem.Discipline;
     School        = mementoItem.School;
     Classroom     = mementoItem.Classroom;
     AuthorId      = mementoItem.AuthorId;
     Content       = mementoItem.Content;
     Conclusion    = mementoItem.Conclusion;
     Rate          = mementoItem.Rate;
     Published     = mementoItem.Published;
     PublishDate   = mementoItem.PublishDate;
     CreationDate  = mementoItem.CreationDate ?? DateTime.Now;
     LastModifDate = mementoItem.LastModifDate;
     LastModifUser = mementoItem.LastModifUser;
     RecordState   = mementoItem.RecordState;
     FeedBacks     = mementoItem.FeedBacks;
     Tags          = mementoItem.Tags;
     Comments      = mementoItem.Comments;
     Ratings       = mementoItem.Ratings;
 }
Пример #2
0
 //constructor with IMemento parameter for EventStore Snapshooting
 private Lesson(LessonMemento mementoItem)
 {
     Id = mementoItem.Id;
     Title = mementoItem.Title;
     Discipline = mementoItem.Discipline;
     School = mementoItem.School;
     Classroom = mementoItem.Classroom;
     AuthorId = mementoItem.AuthorId;
     Content = mementoItem.Content;
     Conclusion = mementoItem.Conclusion;
     Rate = mementoItem.Rate;
     Published = mementoItem.Published;
     PublishDate = mementoItem.PublishDate;
     CreationDate = mementoItem.CreationDate ?? DateTime.Now;
     LastModifDate = mementoItem.LastModifDate;
     LastModifUser = mementoItem.LastModifUser;
     RecordState = mementoItem.RecordState;
     FeedBacks = mementoItem.FeedBacks;
     Tags = mementoItem.Tags;
     Comments = mementoItem.Comments;
     Ratings = mementoItem.Ratings;
 }