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);
            }
        }
Beispiel #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);
            }
        }
 public void AddToTrack(TrackBE track)
 {
     track.AssignTo(this);
 }
Beispiel #4
0
 public void AssignTo(TrackBE track)
 {
     Entity.TrackId = track.Id;
 }