public override List <CommentSupport> CheckElementById(object Id) { TrainingCenterEntities oEntities = ConnectionEntities.getTrainingCenter(mAcount); var oData = oEntities.SP_GETELEMENTSBYIDSTUDENT_COMMONTSUPPORT((int)Id).ToList(); List <CommentSupport> lisComment = new List <CommentSupport>(); foreach (var o in oData) { CommentSupport oComment = new CommentSupport { Id = o.Id, CommentName = o.CommentName, Desription = o.Desription, UserId = o.UserId, UserName = o.UserName, DateLastUpdate = o.DateLastUpdate }; lisComment.Add(oComment); } return(lisComment.Count <= 0 ? null : lisComment); }