Exemplo n.º 1
0
        private void CreateTrack(int playlistID, Track track)
        {
            var insertXr = @"INSERT INTO dbo.xrPlaylistTrack VALUES(PlaylistId,TrackId)
            VALUES (@playlistId,@trackId)";

            _database.Execute(insertXr, new { playlistId = playlistID, trackId = track.Id });
        }
Exemplo n.º 2
0
        public int CreateTrack(Track track)
        {
            var insertTrack = @"INSERT INTO dbo.Track VALUES(Name,Length,Number)
            VALUES (@name,@length,@number); SELECT CAST(SCOPE_IDENTITY() as int;";

            return  _database.ExecuteScalar<int>(insertTrack, new { name = track.Name, length = track.Length, number = track.Number });
        }
Exemplo n.º 3
0
        private void CreateTrack(int albumId, Track track)
        {
            var trackId = _trackRepos.CreateTrack(track);

            var insertXr = @"INSERT INTO dbo.xrAlbumTrack VALUES(AlbumId,TrackId)
            VALUES (@albumId,@trackId)";

            _database.Execute(insertXr, new { albumId = albumId, trackId=trackId });
        }
Exemplo n.º 4
0
 public TrackViewModel(Track track)
 {
     TrackName = track.Name;
     TrackNumber = track.Number;
     TrackLength = track.Length;
 }