Esempio n. 1
0
 public void InsertMeeting(Meeting NewMeeting)
 {
     using (var db = new MeetingPlannerDataBaseEntities()) // creates an instance of the database
     {
         db.Meetings.Add(NewMeeting);
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public void DeleteMeeting(Meeting MeetingToDelete)
 {
     using (var db = new MeetingPlannerDataBaseEntities())
     {
         //Guid id = Guid.Parse(MeetingToDelete.ID);
         var record = db.Meetings.Where(x => x.Id == MeetingToDelete.Id).Single();
         db.Meetings.Remove(record);
         db.SaveChanges();
     }
 }