Relative Content

Tag Archive for asp.net-coreasync-awaitconfigstoreseeding

Change of Program.cs in asp.net core 6 for seedData

I work in asp.net core 6. I have a Json file containing user information to be stored in the database. I also have a class as (SeedUserData) that read from json file and stores users one by one in the database. I want the information from the file to be automatically imported and stored in the database when the program runs, but only if the database is currently empty. How should I modify the program to achieve this?