public IEnumerable <Author> GetAllAuthor() { IEnumerable <Author> Author; using (UnityOfWork unity = new UnityOfWork()) { Author = new AuthorBdRepository(unity).GetAll(); var subjectRep = new SubjectBdRepository(unity); var authorRep = new AuthorBdRepository(unity); foreach (var Authors in Author) { Authors.AddName(subjectRep.GetSNameOfAuthors(Author)); Authors.AddAuthors(authorRep.GetAuthorsOfAuthor(Author)); } unity.Complete(); } return(Author); }