public void UpdateOutput(Participant model) { using (DBLearningModel db = new DBLearningModel()) { db.Entry(model).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
public Participant Insert(Participant model) { using (DBLearningModel db = new DBLearningModel()) { db.Participant.Add(model); db.SaveChanges(); return(model); } }