public static Author GetAuthor(int id = 1, int totalBooks = 10) { var author = new Faker <Author>() .CustomInstantiator(f => new Author( $"Author{id}", "TestUserId")) .Generate() .SetId(id); foreach (var book in GetBooks().Take(totalBooks)) { author.AddBook(book); } return(author); }