ardalis / CleanArchitecture

Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
MIT License
15.2k stars 2.66k forks source link

Adding async capability to database seeding operations #734

Closed samanazadi1996 closed 2 months ago

samanazadi1996 commented 2 months ago

In this commit, the Initialize and PopulateTestData methods in the SeedData class have been modified to be async. Additionally, the SeedDatabase method has been converted to an async method. These changes improve the performance and responsiveness of the application by allowing database seeding operations to be performed asynchronously, enhancing the overall program efficiency.

ardalis commented 2 months ago

Thanks

reifenrath-dev commented 1 month ago

The FunctionalTests project does not build with these changes, because the Contributor1 and Contributor2 properties @samanazadi1996 removed are used by the unit tests. Also the CustomWebApplicationFactory uses PopulateTestData in a synchronous override. Please revert or fix the Tests.

samanazadi1996 commented 1 month ago

Test errors were fixed in the new PR