Beispiel #1
0
        /// <summary>
        /// Returns the program with the given id, or null if it does not exist.
        /// </summary>
        /// <param name="programId">The program id.</param>
        /// <returns>The program, or null if it doesn't exist.</returns>
        public async Task <ProgramDTO> GetProgramByIdAsync(int programId)
        {
            var dto = await ProgramQueries.CreateGetPublishedProgramByIdQuery(this.Context, programId).FirstOrDefaultAsync();

            this.logger.Trace("Retrieved program by id [{0}].", programId);
            return(dto);
        }
Beispiel #2
0
        /// <summary>
        /// Returns the program with the given id, or null if it does not exist.
        /// </summary>
        /// <param name="programId">The program id.</param>
        /// <returns>The program, or null if it doesn't exist.</returns>
        public ProgramDTO GetProgramById(int programId)
        {
            var dto = ProgramQueries.CreateGetPublishedProgramByIdQuery(this.Context, programId).FirstOrDefault();

            this.logger.Trace("Retrieved program by id [{0}].", programId);
            return(dto);
        }