示例#1
0
 public static ShowJournal CreateShowJournal(Journal journal)
 {
     var showJournal = new ShowJournal();
     showJournal.ID = journal.ID;
     showJournal.Path = journal.Path;
     showJournal.ProjectName = journal.ProjectName;
     showJournal.CreateTime = journal.CreateTime;
     return showJournal;
 }
示例#2
0
 private void Add(UpdateJournal updateJournal)
 {
     var journal = new Journal();
     journal.ID = Guid.NewGuid();
     journal.ProjectName = updateJournal.ProjectName;
     journal.Path = updateJournal.Path;
     journal.CreateTime = DateTime.Now;
     using (var monitorContext = new DefaultContext())
     {
         monitorContext.Journals.Add(journal);
         monitorContext.SaveChanges();
     }
     Flag = true;
 }