public IActionResult Index() { List <ExamMemberDTO> examMemberDTO = new List <ExamMemberDTO>(); Member _tempmember; var tempExamList = _examService.All(x => x.IsDeleted == false); if (tempExamList != null) { foreach (var item in tempExamList) { _tempmember = _memberService.Get(x => x.ID == item.MemberID); examMemberDTO.Add(new ExamMemberDTO { CreatedDate = item.CreatedDate, Creater = _tempmember.Name,// +" "+ _tempmember, for surname Header = item.Header, ID = item.ID }); } } return(View(examMemberDTO)); }
public IActionResult Index() { return(View(_examService.All(x => x.MemberID == HttpContext.Session.GetObjectFromJson <Member>("Member").ID&& x.IsDeleted == false))); }