public static IQueryable <User> GetUserForPlatform(PlatformId platformId, BitcornContext dbContext) { switch (platformId.Platform) { case "auth0": return(dbContext.Auth0Query(platformId.Id)); case "twitch": return(dbContext.TwitchQuery(platformId.Id)); case "stream": return(dbContext.TwitchQuery(platformId.Id)); case "twitchusername": return(dbContext.TwitchUsernameQuery(platformId.Id)); case "discord": return(dbContext.DiscordQuery(platformId.Id)); case "twitter": return(dbContext.TwitterQuery(platformId.Id)); case "reddit": return(dbContext.RedditQuery(platformId.Id)); case "userid": return(dbContext.UserIdQuery(int.Parse(platformId.Id))); default: throw new Exception($"User {platformId.Platform}|{platformId.Id} could not be found"); } }