Example #1
0
        /// <summary>
        /// Returns the focus with the given id or null if not found.
        /// </summary>
        /// <param name="id">The id of the focus.</param>
        /// <returns>The focus with the given id, or null if not found.</returns>
        public async Task <FocusDTO> GetFocusByIdAsync(int id)
        {
            var focus = await FocusQueries.CreateGetFocusByIdQuery(this.Context, id).FirstOrDefaultAsync();

            this.logger.Trace("Retrieved focus by id {0}.", id);
            return(focus);
        }
Example #2
0
        /// <summary>
        /// Returns the focus with the given id or null if not found.
        /// </summary>
        /// <param name="id">The id of the focus.</param>
        /// <returns>The focus with the given id, or null if not found.</returns>
        public FocusDTO GetFocusById(int id)
        {
            var focus = FocusQueries.CreateGetFocusByIdQuery(this.Context, id).FirstOrDefault();

            this.logger.Trace("Retrieved focus by id {0}.", id);
            return(focus);
        }