Esempio n. 1
0
 public void UpdateEndDateTime(int id, DateTime newEndDateTime)
 {
     using (var db = new EventsManagerEntities())
     {
         var eve = db.Events.First(x => x.Id == id);
         eve.EndDateTime     = newEndDateTime;
         db.Entry(eve).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public void UpdateLocation(int id, string newLocation)
 {
     using (var db = new EventsManagerEntities())
     {
         var eve = db.Events.First(x => x.Id == id);
         eve.Location        = newLocation;
         db.Entry(eve).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }