/// <summary> /// Retrieves the social media dto with the given id. /// </summary> /// <param name="id">The id of the social media.</param> /// <returns>The social media dto.</returns> public async Task <SocialMediaDTO> GetByIdAsync(int id) { var dto = await SocialMediaQueries.CreateGetSocialMediaDTOByIdQuery(this.Context, id).FirstOrDefaultAsync(); logger.Info("Retrieved the social media dto with the given id [{0}].", id); return(dto); }
/// <summary> /// Retrieves the social media dto with the given id. /// </summary> /// <param name="id">The id of the social media.</param> /// <returns>The social media dto.</returns> public SocialMediaDTO GetById(int id) { var dto = SocialMediaQueries.CreateGetSocialMediaDTOByIdQuery(this.Context, id).FirstOrDefault(); logger.Info("Retrieved the social media dto with the given id [{0}].", id); return(dto); }