Exemple #1
0
        public async Task <List <Book> > InsertBooksAndReturn()
        {
            var tasks = new List <Task>();

            for (int i = 0; i < 3; i++)
            {
                tasks.Add(CreateBook());
            }

            await Task.WhenAll(tasks);

            await _otherService.AddBunchOfBooks();

            return(await _scopedContext.Book.Take(100).ToListAsync());
        }