public Associate.Discussion GetTopic(int topicID) { try { using (AssociateConnDataContext asso = new AssociateConnDataContext()) { var discussion = (from d in asso.Get_Topic(topicID) orderby d.PostDateTime descending where d.TopicID == topicID select new Associate.Discussion { TopicDesc = d.TopicDesc, TopicHeader = d.topicheader, TopicID = d.TopicID, PostDateTime = d.PostDateTime, IsParent = d.IsParent, CreatedBy = d.CreatedBy, CreatedByname = d.FirstName + " " + d.LastName, CommentCount = d.CommentCount, Category = new Category { CategoryID = d.CategoryID, CategoryDesc = d.CategoryDesc }, Group = new Group { GroupID = d.GroupID, GroupDesc = d.GroupDesc }, }).SingleOrDefault(); return discussion; } } catch (Exception ex) { throw ex; } }