public Task HandleAsync(CreateVideoCommand command, CancellationToken cancellationToken = new CancellationToken()) { var track = new VideoTbl { Id = command.Id, TrackId = command.Request.TrackId }; _context.Videos.Add(track); return(_context.SaveChangesAsync(cancellationToken)); }
public Task HandleAsync(CreateTrackCommand command, CancellationToken cancellationToken = new CancellationToken()) { var track = new TrackTbl { Id = command.Id, SpotifyId = command.Request.SpotifyId, Artist = command.Request.Artist, Album = command.Request.Album, Name = command.Request.Name }; _context.Tracks.Add(track); return(_context.SaveChangesAsync(cancellationToken)); }