コード例 #1
0
 public void AddSpeaker(SpeakerDto speaker)
 {
     using (var db = new ConferenceDudeContext())
     {
         var entry = new Speaker { Name = speaker.FirstName + " " + speaker.LastName };
         db.Speakers.Add(entry);
         db.SaveChanges();
     }
 }
コード例 #2
0
 public void UpdateSpeaker(SpeakerDto speaker)
 {
     using (var db = new ConferenceDudeContext())
     {
         db.Entry(new Speaker { Id = speaker.Id, Name = speaker.FirstName + " " + speaker.LastName }).State =
             EntityState.Modified;
         db.SaveChanges();
     }
 }
コード例 #3
0
 public void Save(SpeakerDto speaker)
 {
 }