示例#1
0
        public ViewResult Edit(int id)
        {
            ViewTrack viewTrack;

            viewTrack = Mapper.TrackToViewTrack(trackDomainService.FindTrack(id));
            return(View("EditTrack", viewTrack));
        }
        public void ChangeTrack(ViewTrack viewTrack)
        {
            Track track = trackDomainService.FindTrack(viewTrack.Id);

            track        = Mapper.EditTrackToTrack(viewTrack, track);
            track.Artist = artistDomainService.Get(viewTrack.Artist.Id);
            track.Album  = albumDomainService.Get(viewTrack.Album.Id);
            track.Genre  = genreDomainService.Get(viewTrack.Genre.Id);
            trackDomainService.ChangeTrack();
        }