private IEnumerable <OfflineIdentity> GetIdentityFromReservationSlot(String serie, ReservationSlot reservationSlot) { for (Int64 i = reservationSlot.StartIndex; i <= reservationSlot.EndIndex; i++) { yield return(new OfflineIdentity(serie, i)); } }
public void AddReservation(string serie, ReservationSlot reservationSlot) { _offlineSlots.InsertMany(GetIdentityFromReservationSlot(serie, reservationSlot)); }