public IEnumerable <Candidate> GetCandidates() { List <Candidate> candidates = new List <Candidate>(); var candidatesList = db1.GetItemsList(); foreach (var person in candidatesList) { var candidate = new Candidate { CandidateId = person.CandidateId, Sirname = person.Sirname, Name = person.Name, Vacancy = person.Vacancy, Experience = person.Experience, PhoneNumber = person.PhoneNumber, Email = person.Email, Date1 = person.Date1, Time1 = person.Time1, Date2 = person.Date2, Time2 = person.Time2, Salary = person.Salary, Status = person.Status, Conclusion = person.Conclusion }; candidates.Add(candidate); } return(candidates); }