public void Update(Seance seance)
 {
     var dbEntity = mContext.Seances.Find(seance.Id);
     if (dbEntity != null)
         mContext.Entry(dbEntity).CurrentValues.SetValues(seance);
 }
 private void NotificateUsersOnSeanceChanging(Seance seance, DateTime newDate)
 {
     string newSchedule = string.Format("Новое расписание: (Дата: {0:d}, Время: {0:t})", newDate);
     string msg = string.Format("Время сеанса (Дата: {0:d}, Время{0:t}) на спектакль '{1}' было изменено\n{2}", seance.Date, seance.Spectacle.Name, newSchedule);
     NotifyUsers(seance.Spectators, msg);
 }
 public void Add(Seance seance)
 {
     seance.Id = Guid.NewGuid();
     mContext.Seances.Add(seance);
 }
 private void NotificateUsersOnSeanceDelete(Seance seance)
 {
     string msg = string.Format("Сеанс на спектакль '{0}' (Дата: {1}, Время: {2}), был удален");
     NotifyUsers(seance.Spectators, msg);
 }