I am using entity framework 6 with Web API. I have applied Enable-Migrations command in package manager console and Migration folder created with Configuration class.

I have executed Add-Migration -InitialCreate command initial migration source file created but up and down methods are empty.

so when I recreate the database no table is created except migrationhistory table. No table is created into database so my API cannot perform any POST, GET operation and getting below error message.

Exception type: System.Data.SqlClient.SqlException

Message : Invalid object name 'dbo.Template'.

Please assist me.

I have put my connection string in database.config in startup project not in Web.config of startup project reason behind this was I didn't want to start Web API when database name changes in Web.config. I have attached my Web.config snapshot.