/// <summary> /// Get top 6 news by navigation identifier /// </summary> /// <param name="navID">Navigation identifier</param> /// <returns>List<PostViewModel></returns> public static List <PostViewModel> Top6LastedPostByNavigationID(Guid navID) { try { using (var _context = new TDHEntities()) { return(_context.PROC_WEB_VIEW_POST_Top6ByNavigation(navID) .Select(m => new PostViewModel() { Alias = m.alias, Title = m.title, Description = m.description, Image = m.image, CreateDate = m.create_date }).ToList()); } } catch (Exception ex) { throw new UserException(FILE_NAME, MethodInfo.GetCurrentMethod().Name, 500, ErrorMessage.ErrorService, ex); } }