public int Create(ContinuousProposition cp)
 {
     cp.Init();
     _continuousPropositionRepository.InsertOrUpdate(cp);
     _continuousPropositionRepository.Save();
     return cp.Id;
 }
 public void InsertOrUpdate(ContinuousProposition continuousproposition)
 {
     if (continuousproposition.Id == default(int)) {
         // New entity
         context.ContinuousPropositions.Add(continuousproposition);
     } else {
         // Existing entity
         context.Entry(continuousproposition).State = EntityState.Modified;
     }
 }