public WCFWebServiceJson() { SqlAccountRepository = new SqlAccountRepository(ConnectionString); SqlAlbumRepository = new SqlAlbumRepository(ConnectionString); SqlAlbumGenreRepository = new SqlAlbumGenreRepository(ConnectionString); SqlAlbumSongRepository = new SqlAlbumSongRepository(ConnectionString); SqlArtistRepository = new SqlArtistRepository(ConnectionString); SqlArtistAlbumRepository = new SqlArtistAlbumRepository(ConnectionString); SqlArtistGenreRepository = new SqlArtistGenreRepository(ConnectionString); SqlBusinessTypeRepository = new SqlBusinessTypeRepository(ConnectionString); SqlBusinessUserRepository = new SqlBusinessUserRepository(ConnectionString); SqlCountyCityRepository = new SqlCountyCityRepository(ConnectionString); SqlGenreRepository = new SqlGenreRepository(ConnectionString); SqlMediaAssetFormatRepository = new SqlMediaAssetFormatRepository(ConnectionString); SqlMediaAssetLocationRepository = new SqlMediaAssetLocationRepository(ConnectionString); SqlMediaAssetRepository = new SqlMediaAssetRepository(ConnectionString); SqlMediaAssetTypeRepository = new SqlMediaAssetTypeRepository(ConnectionString); SqlPlaylistRepository = new SqlPlaylistRepository(ConnectionString); SqlPlaylistSongRepository = new SqlPlaylistSongRepository(ConnectionString); SqlProtocolRepository = new SqlProtocolRepository(ConnectionString); SqlPurchasedSongRepository = new SqlPurchasedSongRepository(ConnectionString); SqlSongRepository = new SqlSongRepository(ConnectionString); SqlSongGenreRepository = new SqlSongGenreRepository(ConnectionString); SqlSongMediaAssetRepository = new SqlSongMediaAssetRepository(ConnectionString); SqlUserRepository = new SqlUserRepository(ConnectionString); SqlUserPlaylistRepository = new SqlUserPlaylistRepository(ConnectionString); }
private BusinessUser GetBusinessUserObject(int userId) { var businessUserRepository = new SqlBusinessUserRepository(ConnectionString); var businessUser = businessUserRepository.GetBusinessUserByUserId(userId); return businessUser; }
private BusinessType GetBusinessType(int userId) { var businessTypeRepository = new SqlBusinessTypeRepository(ConnectionString); var businessUserRepository = new SqlBusinessUserRepository(ConnectionString); var businessType = businessTypeRepository.GetBusinessTypeById(businessUserRepository.GetBusinessUserByUserId(userId).BusinessTypeId); return businessType; }