Beispiel #1
0
 /// <summary>
 /// Updates a template or creates a new one if the
 /// modifies template has a reference to the SMSHostory
 /// </summary>
 /// <param name="template"></param>
 public void Update(EFModel.Template template)
 {
     // check if there is any reference
     if (DbContext.SMSHistoryRecords.Any(h => h.TemplateId == template.Id))
     {
         template.Id = 0;
         _templateRepository.Add(template);
     }
     else
     {
         _templateRepository.Update(template);
     }
 }
Beispiel #2
0
 public void CreateTemplate(EFModel.Template template)
 {
     _templateRepository.Add(template);
 }