public PlaylistController(PlaylistsContext context, UsuariosContext userContext, PlaylistMusicasContext playlistMusicasContext, MusicasContext musicasContext) { _context = context; _usersContext = userContext; _playlistMusicasContext = playlistMusicasContext; _musicasContext = musicasContext; }
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; }
public MusicaController(MusicasContext context) { _context = context; }