コード例 #1
0
 public TrackRepository(CDRepository cdRepository)
 {
     // This needs an instacne of the CD repository,
     // and the CD repository needs an instance of this.
     // To avoide a stack overflow issues (circular
     // creation of objects until I run out of memeory)
     // I am passing in an instance of CD repository to
     // this class
     _cdRepository = cdRepository;
 }
コード例 #2
0
ファイル: CDModel.cs プロジェクト: JamesBender/GcMvcDemo
 public CDModel()
 {
     _cdRepository = new CDRepository();
     _trackRepository = new TrackRepository(_cdRepository);
 }