Esempio n. 1
0
 public void Create(IPrincipal user, Event newEvent)
 {
     newEvent.ApplicationUserId = user.Identity.GetUserId();
     newEvent.City = null;
     _repo.Add(newEvent);
     _repo.SaveChanges();
 }
Esempio n. 2
0
 public void Edit(Event event2)
 {
     var original = this.Find(event2.Id);
     original.EventName = event2.EventName;
     original.EventOrganizer = event2.EventOrganizer;
     //original.State = event2.State;
     //original.City = event2.City;
     original.Category = event2.Category;
     original.Date = event2.Date;
     original.Description = event2.Description;
     original.PictureURL = event2.PictureURL;
     //original.Phone = event2.Phone;
     //original.Email = event2.Email;
     _repo.SaveChanges();
 }