예제 #1
0
 public void InsertOrUpdate(CurriculumEntry curriculumEntry)
 {
     if (curriculumEntry.CurriculumEntryId == 0) {
              dbContext.CurriculumEntries.Add(curriculumEntry);
         } else {
              dbContext.Entry(curriculumEntry).State = EntityState.Modified;
         }
         Save();
 }
예제 #2
0
 public void InsertOrUpdate(Curriculum curriculum)
 {
     CurriculumEntry curriculumEntry = new CurriculumEntry();
     if (curriculum.CurriculumId == 0) {
         dbContext.Curricula.Add(curriculum);
     } else {
         dbContext.Entry(curriculum).State = EntityState.Modified;
     }
     Save();
 }