Пример #1
0
        public IEnumerable <TrackBE> GetTracks()
        {
            var ids = Context.Track.Where(p => p.MediaTypeId == Id).Select(p => p.TrackId);

            foreach (var id in ids)
            {
                var item = new TrackBE(CRUDTestDBContextProvider);
                item.Load(id);
                yield return(item);
            }
        }
Пример #2
0
        /// <summary>
        /// Return all TrackBEs
        /// </summary>
        /// <returns></returns>
        public IEnumerable <TrackBE> GetTrackBEs()
        {
            using var context = cRUDTestDBContextProvider.GetContext();
            foreach (var id in context.Track.Select(p => p.TrackId))
            {
                TrackBE trackBE = new TrackBE(cRUDTestDBContextProvider);

                trackBE.Load(id);

                yield return(trackBE);
            }
        }
Пример #3
0
 public void AddToTrack(TrackBE track)
 {
     track.AssignTo(this);
 }
Пример #4
0
 public void AssignTo(TrackBE track)
 {
     Entity.TrackId = track.Id;
 }