Examples/EFCoreSeedDb/README.md
The EFCoreSeedDb example is based on the EF Core Tutorial with the HasData method using Bogus.
To run the example, perform the following commands inside this EfCoreSeedDb folder:
dotnet restoredotnet builddotnet ef migrations add InitialCreatedotnet ef database updatedotnet runAfter the dotnet commands are executed above, you should have a blogging.db SQLite DB file that you can open and inspect the sample data generated from Bogus. Additionally, the dotnet run command will print out the data generated by Bogus to the console read from the blogging.db SQLite DB file.
The basic approach is to pre-generate your Bogus data in-memory, in static properties, before sending sample data to EF Core.
FakeData - Uses the Faker<T> approach.FakeData2 - Uses the Faker facade approach.Either approach above can be used; pick whichever fits your preference and coding style.