示例#1
0
 public void InsertOrUpdate(APPOINTMENTSLOT rate)
 {
     if (rate.APPOINTMENTSLOTID == default(int)) // New entity
     {
         _context.Entry(rate).State = EntityState.Added;
     }
     else        // Existing entity
     {
         _context.Entry(rate).State = EntityState.Modified;
     }
 }
示例#2
0
 public void InsertOrUpdateGraph(APPOINTMENTSLOT userGraph)
 {
     if (userGraph.State == DOCVIDEO.ObjectState.State.Added)
     {
         _context.APPOINTMENTSLOTS.Add(userGraph);
     }
     else
     {
         _context.APPOINTMENTSLOTS.Add(userGraph);
         _context.ApplyStateChanges();
     }
 }