public static async Task <WebChannelDetailed> ProcessAsync(IOwinContext context, string channelId) { if (!ServiceRegistration.IsRegistered <ITvProvider>()) { throw new BadRequestException("GetChannelDetailedById: ITvProvider not found"); } var channel = await TVAccess.GetChannelAsync(int.Parse(channelId)); if (channel == null) { throw new NotFoundException(string.Format("GetChannelDetailedById: Couldn't get channel with Id: {0}", channelId)); } return(ChannelDetailed(channel)); }