Esempio n. 1
0
 private function AddSeries(BlackoutSeries $blackoutSeries)
 {
     $db = ServiceLocator::GetDatabase();
     $seriesId = $db->ExecuteInsert(new AddBlackoutCommand($blackoutSeries->OwnerId(), $blackoutSeries->Title(), $blackoutSeries->RepeatType(), $blackoutSeries->RepeatConfigurationString()));
     foreach ($blackoutSeries->ResourceIds() as $resourceId) {
         $db->ExecuteInsert(new AddBlackoutResourceCommand($seriesId, $resourceId));
     }
     return $seriesId;
 }