public static async Task <WebProgramDetailed> ProcessAsync(IOwinContext context, string programId) { if (!ServiceRegistration.IsRegistered <ITvProvider>()) { throw new BadRequestException("GetProgramDetailedById: ITvProvider not found"); } IProgram program = await TVAccess.GetProgramAsync(context, int.Parse(programId)); if (program == null) { throw new NotFoundException(string.Format("GetProgramDetailedById: Couldn't get Now/Next Info for channel with Id: {0}", programId)); } WebProgramDetailed webProgramDetailed = ProgramDetailed(program); return(webProgramDetailed); }