public void AddSeance(SeanceDTO seance)
        {
            var spectacle = mDb.Spectacles.Get(seance.SpectacleId);
            if (spectacle == null) return;

            var newSeance = seance.Convert();

            newSeance.Id = Guid.NewGuid();
            spectacle.Seances.Add(newSeance);
            mDb.SaveChanges();
        }
        public void ChangeSeance(SeanceDTO seance)
        {
            var dbEntitiy = mDb.Seances.Get(seance.Id);
            if (dbEntitiy == null) return;

            var changed = seance.Convert();

            NotificateUsersOnSeanceChanging(dbEntitiy, changed.Date);

            mDb.Seances.Update(changed);
            mDb.SaveChanges();
        }
示例#3
0
 public void Add(SeanceDTO seance)
 {
     mContext.Seances.Add(seance.Convert());
     mContext.SaveChanges();
 }
示例#4
0
 public void Update(SeanceDTO seance)
 {
     mContext.Seances.Update(seance.Convert());
     mContext.SaveChanges();
 }