Esempio n. 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 FocusDTO GetFocusById(int id)
        {
            var focus = FocusQueries.CreateGetFocusByIdQuery(this.Context, id).FirstOrDefault();

            this.logger.Trace("Retrieved focus by id {0}.", id);
            return(focus);
        }
Esempio n. 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 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);
        }
Esempio n. 3
0
 /// <summary>
 /// Returns a query to dtos.
 /// </summary>
 /// <returns>A query to return focus dtos.</returns>
 protected override IQueryable <FocusDTO> GetSelectDTOQuery()
 {
     return(FocusQueries.CreateGetFocusDTOQuery(this.Context));
 }