Example #1
0
 public questioner Save(questioner questioner)
 {
     if (questioner.questioner_id == 0)
     {
         //insert
         db.questioner.Add(questioner);
     }
     else
     {
         //update
         db.Entry(questioner).State = System.Data.Entity.EntityState.Modified;
     }
     db.SaveChanges();
     return(questioner);
 }
Example #2
0
 public void Delete(questioner questioner)
 {
     db.questioner.Remove(questioner);
 }