namespaceAcme.BookStore{publicclassBookStoreDataSeedContributor:IDataSeedContributor,ITransientDependency{privatereadonlyIRepository<Book,Guid>_bookRepository;privatereadonlyIGuidGenerator_guidGenerator;privatereadonlyICurrentTenant_currentTenant;publicBookStoreDataSeedContributor(IRepository<Book,Guid>bookRepository,IGuidGeneratorguidGenerator,ICurrentTenantcurrentTenant){_bookRepository=bookRepository;_guidGenerator=guidGenerator;_currentTenant=currentTenant;}publicasyncTaskSeedAsync(DataSeedContextcontext){using(_currentTenant.Change(context?.TenantId)){if(await_bookRepository.GetCountAsync()>0){return;}varbook=newBook(id:_guidGenerator.Create(),name:"The Hitchhiker's Guide to the Galaxy",type:BookType.ScienceFiction,publishDate:newDateTime(1979,10,12),price:42);await_bookRepository.InsertAsync(book);}}}}