public PlaylistController(PlaylistsContext context, UsuariosContext userContext, PlaylistMusicasContext playlistMusicasContext, MusicasContext musicasContext)
 {
     _context                = context;
     _usersContext           = userContext;
     _playlistMusicasContext = playlistMusicasContext;
     _musicasContext         = musicasContext;
 }
Beispiel #2
0
        public void InitContext()
        {
            var builder = new DbContextOptionsBuilder <MusicasContext>();

            var context = new MusicasContext(builder.Options);

            _musicasContext = context;
        }
        public void InitContext()
        {
            var builder = new DbContextOptionsBuilder <PlaylistsContext>();
            var context = new PlaylistsContext(builder.Options);

            _playlistsContext = context;

            var builderMusica = new DbContextOptionsBuilder <MusicasContext>();
            var contextMusica = new MusicasContext(builderMusica.Options);

            _musicasContext = contextMusica;

            var builderUsuario = new DbContextOptionsBuilder <UsuariosContext>();
            var contextUsuario = new UsuariosContext(builderUsuario.Options);

            _usersContext = contextUsuario;

            var builderPlaylistMusicas = new DbContextOptionsBuilder <PlaylistMusicasContext>();
            var contextPlaylistMusicas = new PlaylistMusicasContext(builderPlaylistMusicas.Options);

            _playlistMusicasContext = contextPlaylistMusicas;
        }
Beispiel #4
0
 public MusicaController(MusicasContext context)
 {
     _context = context;
 }