Beispiel #1
0
        public static async Task <WebScheduleBasic> ProcessAsync(IOwinContext context, string scheduleId)
        {
            if (!ServiceRegistration.IsRegistered <ITvProvider>())
            {
                throw new BadRequestException("GetScheduleById: ITvProvider not found");
            }

            var schedule = await TVAccess.GetScheduleAsync(context, int.Parse(scheduleId));

            if (schedule == null)
            {
                throw new NotFoundException(string.Format("GetScheduleById: Couldn't get schedule with Id: {0}", scheduleId));
            }

            WebScheduleBasic output = ScheduleBasic(schedule);

            return(output);
        }