I have a code first create database table which I truncate and insert approximately 12000 records in with a c# script and Entity Framework Core 2.2.6.
I have 5 indexes on the table which I need to recreate after I do my database work. I can of course do this manually each time after I run my script, but being a programmer, that feels weird.
I tried finding a way to do this with EntityFrameworkCore, but I cannot seem to find it.
As a last resort I can execute a SQL command of course, but I was wondering whether there is some EntityFrameworkCore functionality that I am overlooking.
Or are there other ways of doing this more efficiently?
edit:
I run my script each time I receive a new DB from a third party to create our own from it, now in development that is roughly each month, later that will be less, so manually is an option, but I have an allergy for doing things manually